/* ==========================================================================
   LACEV - Laboratory of Plant Cognition and Electrophysiology (UFPel)
   Static Institutional Portal & 3D Bioelectrical Plant Morphing Stylesheet
   ========================================================================== */

:root {
  /* Institutional Light Botanical Palette (Default for Easy Reading) */
  --bg-primary: #f6f8f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #ebf1e8;
  --bg-glass: rgba(255, 255, 255, 0.86);
  --bg-hero: #0a140f;
  --text-primary: #142219;
  --text-secondary: #3b5042;
  --text-muted: #5e7465;
  --text-on-dark: #f2f7f4;
  --accent-botanical: #1b6b3a;
  --accent-botanical-light: #289653;
  --accent-electrome: #00b4d8;
  --accent-action-potential: #ffb703;
  --accent-ufpel-navy: #0e294b;
  --border-subtle: rgba(20, 34, 25, 0.12);
  --border-strong: rgba(27, 107, 58, 0.28);
  --shadow-card: 0 10px 30px -10px rgba(14, 34, 22, 0.08);
  --shadow-hover: 0 18px 40px -12px rgba(14, 34, 22, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-serif: "Newsreader", "Source Serif 4", Georgia, Cambria, serif;
  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-width: 1280px;
  --header-height: 76px;
}

[data-theme="dark"] {
  --bg-primary: #0b140f;
  --bg-secondary: #122018;
  --bg-tertiary: #182b20;
  --bg-glass: rgba(18, 32, 24, 0.88);
  --bg-hero: #070e0a;
  --text-primary: #eaf2ed;
  --text-secondary: #b9ccc0;
  --text-muted: #849c8d;
  --text-on-dark: #f2f7f4;
  --accent-botanical: #37b868;
  --accent-botanical-light: #52d684;
  --accent-electrome: #38d9f5;
  --accent-action-potential: #ffc93c;
  --accent-ufpel-navy: #27568b;
  --border-subtle: rgba(234, 242, 237, 0.12);
  --border-strong: rgba(55, 184, 104, 0.35);
  --shadow-card: 0 12px 32px -10px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 44px -12px rgba(0, 0, 0, 0.65);
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-botanical);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-botanical-light);
}

/* Institutional Top Bar */
.inst-topbar {
  background-color: var(--accent-ufpel-navy);
  color: #e2ecf7;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  padding: 0.45rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inst-topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.inst-topbar a {
  color: #a9d1ff;
  font-weight: 500;
}

.inst-topbar a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.inst-topbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Main Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-card);
}

.header-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-primary);
}

.brand-logo {
  height: 46px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-acronym {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 250px;
  line-height: 1.25;
}

/* Primary Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-botanical);
  background-color: var(--bg-tertiary);
}

/* Header Controls (Language & Theme & Sim Toggle) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
  background-color: var(--accent-botanical);
  color: #ffffff;
}

.theme-btn,
.mobile-menu-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--accent-botanical);
}

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   HERO & LOVABLE-STYLE INTERACTIVE 3D BIOELECTRICAL STAGE
   ========================================================================== */
.hero-stage {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  background-color: #060d0a;
  background-image:
    linear-gradient(135deg, rgba(5, 11, 8, 0.86) 0%, rgba(11, 21, 18, 0.72) 50%, rgba(17, 9, 28, 0.84) 100%),
    url("img/hero_electrome_bg.svg"),
    url("img/cropped-16730442_385680711812479_5225719001251518374_n-e1552326507547.jpg");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-blend-mode: normal, screen, luminosity;
  color: var(--text-on-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--accent-botanical);
}

/* 3D WebGL / Canvas Container */
.canvas-3d-wrapper {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

#plant-electrome-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#plant-electrome-canvas:active {
  cursor: grabbing;
}

/* Interactive Lovable-style Radial Spotlight & Mesh Aura Overlay */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      650px circle at var(--mouse-x, 50%) var(--mouse-y, 45%),
      rgba(255, 42, 157, 0.16),
      rgba(0, 229, 255, 0.1) 42%,
      transparent 78%
    ),
    radial-gradient(
      900px circle at 22% 35%,
      rgba(55, 184, 104, 0.18),
      transparent 70%
    ),
    radial-gradient(
      850px circle at 82% 24%,
      rgba(155, 44, 255, 0.2),
      transparent 70%
    );
}

.hero-content-container {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.hero-text-panel {
  pointer-events: auto;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 2.2rem 2rem;
  border-radius: 24px;
  background: rgba(6, 13, 10, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 70px -18px rgba(0, 0, 0, 0.65),
    0 0 50px -15px rgba(0, 229, 255, 0.14),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.inst-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  padding: 0.4rem 1rem;
  background: linear-gradient(90deg, rgba(27, 107, 58, 0.38), rgba(155, 44, 255, 0.28));
  border: 1px solid rgba(114, 239, 221, 0.45);
  color: #9bf6ff;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.8vw, 4.1rem);
  font-weight: 700;
  line-height: 1.12;
  color: #ffffff;
  margin-bottom: 1.35rem;
  letter-spacing: -0.015em;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.72;
  color: #d6e8dd;
  margin: 0 auto 2rem;
  max-width: 790px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #289653 0%, #00b4d8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px -6px rgba(0, 180, 216, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -6px rgba(0, 229, 255, 0.65);
  color: #ffffff;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: #eaf4ee;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Lovable-style Floating Interactive Signal Pill Dock */
.hero-signal-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.signal-dock-label {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ec5b0;
}

.signal-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.stim-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dcebe2;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stim-btn:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
}

.stim-btn.active {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.34), rgba(255, 42, 157, 0.28));
  border-color: #00e5ff;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
}

.stim-btn.morph-pill {
  border-color: rgba(255, 183, 3, 0.45);
  color: #ffe194;
}

.stim-btn.morph-pill:hover {
  background: rgba(255, 183, 3, 0.2);
  border-color: #ffb703;
}

/* ==========================================================================
   SECTIONS & LAYOUT CONTAINERS
   ========================================================================== */
.section-block {
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-block.alt-bg {
  background-color: var(--bg-tertiary);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
  max-width: 820px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-botanical);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.section-lead {
  font-size: 1.06rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   ABOUT LACEV SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
}

.about-prose {
  min-width: 0;
}

.about-prose p {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-align: justify;
}

.pillar-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.pillar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-botanical);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
}

.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  text-align: left;
}

.about-visual-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.about-image-card {
  background: #07120d;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 20px 50px -15px rgba(4, 15, 10, 0.45),
    0 0 38px -10px rgba(0, 229, 255, 0.22);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.about-image-card:hover {
  border-color: rgba(82, 214, 132, 0.65);
  box-shadow:
    0 24px 60px -15px rgba(4, 15, 10, 0.6),
    0 0 48px -8px rgba(0, 229, 255, 0.35);
}

/* Interactive About Carousel Styles (Synchronized with Top Hero Bioelectrical Aesthetic) */
.carousel-stage {
  position: relative;
  width: 100%;
  height: 360px;
  max-height: 360px;
  background: radial-gradient(circle at 50% 50%, #0b1e16 0%, #050b08 100%);
  overflow: hidden;
  user-select: none;
  perspective: 900px;
}

.carousel-electrome-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.carousel-aurora-glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(
      260px circle at var(--c-mouse-x, 50%) var(--c-mouse-y, 50%),
      rgba(0, 229, 255, 0.22),
      rgba(55, 184, 104, 0.1) 48%,
      transparent 78%
    ),
    linear-gradient(180deg, rgba(5, 11, 8, 0.42) 0%, transparent 25%, transparent 72%, rgba(5, 11, 8, 0.72) 100%);
}

.carousel-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 6;
}

.carousel-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #37b868, #00e5ff, #ff2a9d);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.75);
  transition: width 0.1s linear;
}

.carousel-top-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.carousel-counter {
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(8, 18, 13, 0.78);
  backdrop-filter: blur(8px);
  color: #9bf6ff;
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.2);
}

.carousel-hud-actions {
  display: flex;
  gap: 0.4rem;
  pointer-events: auto;
}

.carousel-ctrl-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 18, 13, 0.78);
  backdrop-filter: blur(8px);
  color: #e6f4ec;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.carousel-ctrl-btn:hover {
  background: linear-gradient(135deg, #289653, #00b4d8);
  border-color: #00e5ff;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

.carousel-slides-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08) rotateY(8deg) translateZ(-30px);
  filter: brightness(1.4) contrast(1.15) saturate(1.3) blur(4px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1) rotateX(var(--c-tilt-x, 0deg)) rotateY(var(--c-tilt-y, 0deg)) translateZ(0);
  filter: brightness(1) contrast(1.02) saturate(1.05) blur(0px);
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.carousel-nav-arrow {
  position: absolute;
  bottom: 14px;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 18, 13, 0.78);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-nav-arrow:hover {
  background: var(--accent-botanical);
  border-color: #52d684;
  transform: translateY(-1px);
}

.carousel-nav-arrow.prev {
  left: 12px;
}

.carousel-nav-arrow.next {
  right: 12px;
}

.carousel-thumbs-strip {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: thin;
}

.carousel-thumb-btn {
  flex: 0 0 58px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-tertiary);
  padding: 0;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.carousel-thumb-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.carousel-thumb-btn.active {
  opacity: 1;
  border-color: var(--accent-botanical);
  box-shadow: 0 0 0 1px var(--accent-botanical);
}

.carousel-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-caption {
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Lightbox Dialog */
.carousel-lightbox {
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(8, 16, 12, 0.96);
  color: #ffffff;
  max-width: min(92vw, 1080px);
  max-height: 90vh;
  padding: 1rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
}

.carousel-lightbox::backdrop {
  background: rgba(4, 10, 7, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.lightbox-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #9ec5b0;
}

.lightbox-img-wrap {
  max-height: 78vh;
  overflow: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.social-outreach-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

.social-outreach-box h3 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.social-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.social-links-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.social-platform-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   RESEARCH PROJECTS SECTION
   ========================================================================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.project-meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.project-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--accent-botanical);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  text-align: justify;
}

.subprojects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.subproject-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.subproject-item h4 {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.subproject-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.project-footer-meta {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ==========================================================================
   SCIENTIFIC PUBLICATIONS / ARTICLES SECTION
   ========================================================================== */
.pub-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-tab {
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--accent-botanical);
  color: #ffffff;
  border-color: var(--accent-botanical);
}

.search-input-wrap {
  flex: 1;
  max-width: 340px;
}

.pub-search-input {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.publications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.pub-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pub-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.pub-card-top {
  margin-bottom: 1rem;
}

.pub-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.pub-year-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background: var(--bg-tertiary);
  color: var(--accent-botanical);
  border-radius: 4px;
}

.pub-journal {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

.pub-authors {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.pub-details-info {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pub-abstract-details {
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
}

.pub-abstract-details summary {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-botanical);
  cursor: pointer;
  user-select: none;
}

.pub-abstract-text {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: justify;
}

.pub-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.doi-code {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  word-break: break-all;
}

.pub-link-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  background: var(--bg-tertiary);
  color: var(--accent-botanical);
  border-radius: 4px;
  border: 1px solid var(--border-strong);
}

.pub-link-btn:hover {
  background: var(--accent-botanical);
  color: #ffffff;
}

/* ==========================================================================
   COORDINATION & TEAM SECTION
   ========================================================================== */
.team-banner-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.team-banner-img-wrap {
  max-height: 400px;
  overflow: hidden;
}

.team-banner-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-banner-text {
  padding: 2.25rem;
}

.team-banner-text h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.team-banner-text p {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.team-category-block {
  margin-bottom: 2.75rem;
}

.team-category-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-count-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.person-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.person-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.person-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-botanical);
  flex-shrink: 0;
  background-color: var(--bg-tertiary);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.person-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.person-contact-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  word-break: break-all;
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.person-badge-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--accent-botanical);
  border: 1px solid var(--border-strong);
}

.person-badge-link:hover {
  background: var(--accent-botanical);
  color: #ffffff;
}

/* Collaborators Two-Column Layout */
.collaborators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.75rem;
}

.collab-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.collab-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
}

.collab-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.collab-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.collab-name {
  font-weight: 600;
  color: var(--text-primary);
}

.collab-affil {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: right;
}

/* ==========================================================================
   NEWS, EVENTS, MEDIA & PUBLIC CALLS SECTION
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card.featured-wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.news-thumb-wrap {
  height: 210px;
  overflow: hidden;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.news-card.featured-wide .news-thumb-wrap {
  height: 100%;
  min-height: 280px;
  border-bottom: none;
  border-left: 1px solid var(--border-subtle);
}

.news-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-botanical);
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: block;
}

.news-title {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.news-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.press-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}

.press-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.18rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
}

.press-tag:hover {
  border-color: var(--accent-botanical);
  color: var(--accent-botanical);
}

/* Public Calls & Selection Archives (Stoller / IC) */
.calls-archive-box {
  margin-top: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.calls-archive-box h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.calls-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.calls-table th,
.calls-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.calls-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   VEGETANDO SCIENCE OUTREACH & CONTACT SECTION
   ========================================================================== */
.vegetando-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.vegetando-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.vegetando-card img {
  width: 100%;
  height: auto;
  display: block;
}

.vegetando-card-caption {
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.86rem;
}

/* Contact & Footer */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.contact-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.partner-logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.partner-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.site-footer {
  background-color: var(--bg-hero);
  color: #b7cbc0;
  padding: 3rem 1.5rem;
  font-size: 0.86rem;
  border-top: 2px solid var(--accent-botanical);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-inner a {
  color: #80ed99;
}

/* ==========================================================================
   RESPONSIVE DESIGN & REDUCED MOTION
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content-container,
  .about-grid,
  .team-banner-box,
  .contact-grid,
  .news-card.featured-wide {
    grid-template-columns: 1fr;
  }

  .publications-grid,
  .collaborators-grid,
  .vegetando-grid {
    grid-template-columns: 1fr;
  }

  .news-grid,
  .subprojects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
  }

  .main-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: inline-block;
  }

  .news-grid,
  .subprojects-grid,
  .pillar-cards,
  .scope-metrics {
    grid-template-columns: 1fr;
  }
}
