/* ─── CUSTOM VARIABLES (Bootstrap compatible) ───── */
:root {
  --ink:    #0d1b2e;
  --deep:   #07253f;
  --mid:    #0e4d7b;
  --teal:   #1a7fa0;
  --cyan:   #2fb8c8;
  --foam:   #7dd8e4;
  --pale:   #e8f6f9;
  --white:  #f7fbfd;
  --sand:   #f0ede6;
  --accent: #e05c28;
  --muted:  #6b8fa8;
  --serif:  'Manrope', system-ui, sans-serif;
  --sans:   'Manrope', system-ui, sans-serif;
  --nav-h:  64px;
}

/* ─── BASE STYLES ──────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--deep); margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; color: var(--mid); margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; color: #2a3d50; }
a  { color: var(--teal); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
em { font-style: italic; }
strong { font-weight: 600; }
sub, sup { font-size: 0.72em; }

/* ─── NAV (Bootstrap navbar override) ───────────── */
.navbar {
  height: var(--nav-h);
  background: rgba(7,37,63,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(47,184,200,0.18);
  padding: 0 2rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}
.navbar-collapse {
  justify-content: center;
}
.nav-logo-wrap {
  height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-wrap img { height: 55px; width: auto; border-radius: 4px; }
.nav-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
  color: var(--foam); letter-spacing: 0.02em;
}
.nav-title sup {
  font-size: .55em; font-weight: 700;
  background: var(--teal); color: #fff;
  padding: 1px 4px; border-radius: 3px;
  vertical-align: super; letter-spacing: .04em;
}
.nav-link {
  color: rgba(255,255,255,0.72) !important;
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.65rem !important;
  border-radius: 4px;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(47,184,200,0.14);
  color: var(--foam) !important;
}

/* Mobile menu button override */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  background: transparent;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foam);
  border-radius: 2px;
  margin: 5px 0;
}

/* Mobile menu styles */
@media (max-width: 767px) {
  .navbar-collapse {
    background: rgba(7,37,63,0.98);
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-radius: 8px;
  }
  .navbar-nav {
    text-align: center;
  }
  .nav-item {
    margin: 0.5rem 0;
  }
  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
  }
}

/* ─── HERO ──────────────────────────────────────── */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--deep);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(47,184,200,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,184,200,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}
#hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(14,77,123,0.4) 0%, transparent 70%),
              linear-gradient(180deg, transparent 60%, var(--deep) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  text-align: center;
  padding: 4rem 2rem 6rem;
  max-width: 860px;
}
.hero-logo {
  margin-bottom: 2.5rem;
  display: inline-block;
  animation: fadeUp 0.9s ease both;
}
.hero-logo img {
  width: min(650px, 95vw);
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(47,184,200,0.25));
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-tagline {
  font-family: var(--serif); font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--foam); font-style: italic; margin-bottom: 1.25rem;
  animation: fadeUp 0.9s 0.15s ease both;
}
.hero-sub {
  font-size: 0.95rem; color: rgba(125,216,228,0.72);
  margin: 0 auto 2rem;
  text-align: justify;
  animation: fadeUp 0.9s 0.3s ease both;
}

/* ─── BUTTONS (Bootstrap override) ───────────────── */
.btn {
  display: inline-block; padding: 0.65rem 1.6rem; border-radius: 4px;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: all .2s; cursor: pointer; text-decoration: none;
}

.btn-saumon {
  background: var(--teal);
  border: none;
}

.btn-saumon:hover {
  background: var(--cyan);
  transform: translateY(-2px);
}

.btn-saumon:active,
.btn-saumon:focus {
  background: var(--teal);
  transform: translateY(0);
}
.btn-primary {
  background: var(--teal) !important;
  color: #fff !important;
  border: 2px solid var(--teal) !important;
}
.btn-primary:hover {
  background: var(--cyan) !important;
  border-color: var(--cyan) !important;
  color: var(--deep) !important;
}
.btn-outline {
  background: transparent !important;
  color: var(--foam) !important;
  border: 2px solid rgba(125,216,228,0.45) !important;
}
.btn-outline:hover {
  border-color: var(--foam) !important;
  color: #fff !important;
}

/* wave divider */
.wave-divider { display: block; line-height: 0; }
.wave-divider svg { display: block; width: 100%; }

/* ─── SECTIONS ──────────────────────────────────── */
.section { padding: 5rem 1.5rem; max-width: 1040px; margin: 0 auto; }
.section-label {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.6rem; display: block;
}
.section-divider {
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  margin: 1rem 0 2.5rem; border-radius: 2px;
}
.sec-h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--deep); margin-top: 3rem; margin-bottom: 1rem;
}

/* ─── ABOUT ─────────────────────────────────────── */
#about { background: var(--white); }
#about p { text-align: justify; }
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 3.5rem 5rem; align-items: start; }
@media(max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-lede {
  font-family: var(--serif); font-size: 1.1rem; color: var(--deep);
  line-height: 1.65; margin-bottom: 1.25rem;
  border-left: 2px solid var(--cyan); padding-left: 1.2rem;
  text-align: justify;
}
.exp-list { list-style: none; }
.exp-item {
  display: grid; grid-template-columns: 52px 1fr; gap: .75rem;
  padding: .85rem 0; border-bottom: 1px solid #dce8ee;
}
.exp-item:first-child { border-top: 1px solid #dce8ee; }
.exp-link { text-decoration: none; display: contents; }
.exp-link:hover .exp-n { color: var(--accent); }
.exp-link:hover .exp-t strong { color: var(--teal); }
.exp-n { font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: var(--teal); padding-top: .1rem; }
.exp-t { font-size: .88rem; color: #2a3d50; line-height: 1.55; }
.exp-t strong { font-weight: 600; color: var(--deep); display: block; margin-bottom: .1rem; }
.motiv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }
@media(max-width: 500px) { .motiv-grid { grid-template-columns: 1fr; } }
.motiv {
  background: var(--pale); border-left: 3px solid var(--teal);
  padding: 1rem 1.15rem; border-radius: 0 6px 6px 0;
}
.motiv h4 {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: .4rem;
}
.motiv p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* ─── CARDS (Bootstrap card override) ───────────────── */
.card {
  background: var(--white);
  border: 1px solid #dce8ee;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 12px rgba(26,127,160,.08);
}

/* ─── BADGES (Bootstrap badge override) ─────────────── */
.badge {
  font-size: .6rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: .2rem .55rem; border-radius: 3px;
}
.badge-new { background: var(--pale); color: var(--teal); }
.badge-pre { background: rgba(47,184,200,.08); color: var(--cyan); border: 1px solid rgba(47,184,200,.25); }
.badge-v1  { background: var(--sand); color: var(--muted); border: 1px solid #dce8ee; }
.badge-use { background: transparent; color: var(--muted); border: 1px solid #dce8ee; }

/* ─── PUBLICATIONS ──────────────────────────────── */
#publications { background: var(--sand); }
.pub-group { margin-bottom: 2.5rem; }
.pub-group-hd {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: .5rem; border-bottom: 1px solid #dce8ee; margin-bottom: 1rem;
}
.pub-card {
  background: var(--white); border: 1px solid #dce8ee;
  border-radius: 6px; padding: 1.4rem 1.6rem; margin-bottom: .75rem;
  transition: border-color .15s, box-shadow .15s;
}
.pub-card:hover { border-color: var(--teal); box-shadow: 0 2px 12px rgba(26,127,160,.08); }

/* Color zones for publication groups */
.pub-group:nth-child(2) .pub-group-hd { color: var(--teal); border-color: var(--teal); }
.pub-group:nth-child(2) .pub-card { background: var(--pale); border-color: rgba(47,184,200,0.3); }

.pub-group:nth-child(3) .pub-group-hd { color: var(--teal); border-color: var(--teal); }
.pub-group:nth-child(3) .pub-card { background: rgba(47,184,200,0.08); border-color: rgba(47,184,200,0.25); }

.pub-group:nth-child(4) .pub-group-hd { color: var(--mid); border-color: var(--mid); }
.pub-group:nth-child(4) .pub-card { background: rgba(14,77,123,0.05); border-color: rgba(14,77,123,0.2); }

.badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pub-authors { font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.pub-title {
  font-family: var(--serif); font-style: italic; font-size: .97rem;
  color: var(--deep); line-height: 1.45; display: block; margin-bottom: .4rem; transition: color .15s;
}
.pub-title:hover { color: var(--teal); }
.pub-venue { font-size: .82rem; color: var(--muted); }
.pub-doi {
  font-size: .74rem; font-weight: 500; color: var(--teal);
  display: inline-block; margin-top: .5rem;
}

/* ─── METHODS ───────────────────────────────────── */
#methods { background: var(--white); }
.mtable-wrap { overflow-x: auto; margin-top: 1rem; }
.mtable { width: 100%; border-collapse: collapse; font-size: .87rem; }
.mtable thead th {
  background: var(--mid); color: #fff;
  font-family: var(--sans); font-weight: 600; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .7rem 1rem; text-align: left;
}
.mtable tbody tr { border-bottom: 1px solid #dce8ee; }
.mtable tbody tr:nth-child(even) { background: var(--pale); }
.mtable tbody tr:hover { background: rgba(47,184,200,.06); }
.mtable td { padding: .65rem 1rem; color: #2a3d50; vertical-align: top; }
.td-name { font-weight: 600; color: var(--deep); white-space: nowrap; font-style: italic; }
.td-ref { font-size: .84rem; line-height: 1.55; }
.td-ref em { font-style: italic; }
.td-dl a { font-size: .8rem; font-weight: 600; color: var(--teal); }
.td-dl small { font-size: .68rem; color: var(--muted); display: block; }

/* Color zones for method groups */
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(1) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(2) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(3) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(4) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(5) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(6) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(7) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(8) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(9) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(1) .mtable tbody tr:nth-child(10) { background: rgba(47,184,200,0.08); }

.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(11) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(12) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(13) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(14) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(15) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(16) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(17) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(18) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(19) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(20) { background: rgba(47,184,200,0.08); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(21) { background: rgba(47,184,200,0.06); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(22) { background: rgba(47,184,200,0.04); }
.mtable-wrap:nth-of-type(2) .mtable tbody tr:nth-child(23) { background: rgba(47,184,200,0.08); }

/* ─── RESOURCES ─────────────────────────────────── */
#resources { background: var(--sand); }
.res-grid {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2.5rem;
}
.res-tile {
  background: var(--white); padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column; gap: .3rem;
  border-radius: 8px; border: 1px solid #dce8ee;
  flex: 1 1 calc(33.333% - 0.667rem);
  min-width: 250px;
}
@media(max-width:760px){ .res-tile { flex: 1 1 calc(50% - 0.5rem); } }
@media(max-width:460px){ .res-tile { flex: 1 1 100%; } }
.res-tile { transition: background .15s; }
.res-tile:hover { background: var(--pale); }
.res-num { font-size: .65rem; font-weight: 500; letter-spacing: .1em; color: var(--cyan); }
.res-name { font-size: .92rem; font-weight: 600; color: var(--deep); }
.res-desc { font-size: .82rem; color: var(--muted); flex: 1; margin: .1rem 0 .5rem; line-height: 1.55; }
.res-link {
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--teal); display: inline-flex;
  align-items: center; gap: .3rem;
}
.res-link::after { content: '↗'; font-size: .85em; }
.res-link:hover { color: var(--accent); }

/* ─── ORGANIZATIONS ─────────────────────────────── */
#organizations { background: var(--white); }
.orgs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1.5rem; }
.org-card {
  background: var(--pale); border: 1px solid #dce8ee;
  border-radius: 6px; padding: .9rem 1rem;
  display: flex; flex-direction: column;
  align-items: center; gap: .5rem;
  transition: border-color .15s;
  text-decoration: none;
  color: inherit;
}
.org-card:hover { border-color: var(--teal); }
.org-logo {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.org-logo img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}
.org-card .org-logo + .org-logo {
  margin-top: 0.5rem;
}
.org-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  width: 100%;
  text-align: center;
}
.org-flag { font-size: 1.2rem; flex-shrink: 0; }
.org-name { font-weight: 600; font-size: .82rem; color: var(--deep); margin-bottom: .05rem; line-height: 1.25; }
.org-loc { font-size: .73rem; color: var(--muted); }

/* ─── EVENTS ────────────────────────────────────── */
#events { background: var(--pale); }
.ev-list { display: flex; flex-direction: column; }
.ev-row-with-image {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding: .85rem 0;
  border-bottom: 1px solid #dce8ee;
}
.ev-main {
  min-width: 0;
}

.ev-main .event-description {
  margin: .55rem 0 0;
}


.ev-content {
  min-width: 0;
}

.event-description {
  text-align: justify;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: .55rem 0 0;
}


.ev-content {
  min-width: 0;
}

.event-description {
  text-align: justify;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: .75rem 0 0;
}
/* .ev-row-with-image:first-child {
  border-top: 1px solid #dce8ee;
} */
.ev-row-with-image .ev-row {
  border: none;
  padding: 0;
}
.ev-row {
  display: grid; grid-template-columns: 190px 1fr auto;
  gap: 1rem; align-items: baseline;
  padding: .85rem 0; border-bottom: 1px solid #dce8ee;
}
.ev-row:first-child { border-top: 1px solid #dce8ee; }
.ev-row.no-border { border: none; }
.ev-date { font-size: .8rem; font-weight: 600; color: var(--teal); }
.ev-desc { font-size: .9rem; color: var(--ink); }
.ev-tag {
  font-size: .58rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: .15rem .45rem; border-radius: 3px; white-space: nowrap;
}
.ev-tag.new { background: var(--pale); color: var(--teal); border: 1px solid rgba(47,184,200,.3); }
.ev-tag.old { background: var(--sand); color: var(--muted); }
.event-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}
@media(max-width: 768px) { 
  .ev-row-with-image { grid-template-columns: 1fr; }
  .ev-row { grid-template-columns: 1fr; gap: .25rem; } 
}

/* ─── LINKS ─────────────────────────────────────── */
#links { background: var(--sand); }
.links-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}
.link-card {
  background: var(--white); border: 1px solid #dce8ee;
  border-radius: 8px; padding: 1.4rem 1.6rem;
  transition: box-shadow .2s, border-color .2s;
}
.link-card:hover { box-shadow: 0 4px 20px rgba(14,77,123,.1); border-color: var(--teal); }
.link-card h3 {
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--teal); margin-bottom: .75rem;
}
.link-card ul { list-style: none; padding: 0; }
.link-card li { margin-bottom: .45rem; }
.link-card a { font-size: .88rem; color: #2a3d50; font-weight: 400; }
.link-card a:hover { color: var(--teal); }

.event-description {
  text-align: justify;
}
/* ─── CONTACT ───────────────────────────────────── */
#contact { background: var(--white); position: relative; }
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 1.5rem; margin-bottom: 2rem;
}
.cc {
  border: 1px solid #dce8ee;
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
  background: var(--pale);
  transition: border-color .15s;
}
.cc:hover { border-color: var(--teal); }
.cc-name { font-weight: 600; font-size: 0.95rem; color: var(--deep); margin-bottom: 0.15rem; }
.cc-role {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 0.1rem;
}
.cc-affil { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.7rem; }
.cc-exp {
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 0.5rem;
}
.cc-email {
  font-size: 0.85rem; color: var(--teal);
  text-decoration: none; padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.5); border-radius: 4px;
  transition: background 0.2s;
}
.cc-email:hover { background: rgba(255,255,255,0.8); }

.contact-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.4rem;
  grid-column: span 2;
}
.contact-logo img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
}

@media (max-width: 768px) {
  .contact-logo {
    grid-column: span 1;
  }
}

/* ─── FLIP CARDS ───────────────────────────────────── */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 280px;
  perspective: 1000px;
  border-radius: 12px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.flip-card-front {
  background: var(--pale);
  color: var(--deep);
}

.flip-card-front .cc-exp-front {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.flip-card-front h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--deep);
}

.flip-card-front .org-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.flip-card-front .org-logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.orgs-grid .flip-card-front,
.orgs-grid .flip-card-back {
  padding: 0;
}

.orgs-grid .flip-card {
  height: 120px;
}

#organizations .section > .flip-card {
  height: 120px;
  max-width: 400px;
  margin: 0;
}

@media (max-width: 576px) {
  #organizations .section > .flip-card {
    height: 160px;
  }
  
  #organizations .section > .flip-card .org-logo img {
    max-height: 45px;
  }
}

#organizations .flip-card-front,
#organizations .flip-card-back {
  padding: 1rem;
}

.contact-grid .flip-card {
  height: 240px;
}

.flip-card-back {
  background: var(--mid);
  color: var(--white);
  transform: rotateY(180deg);
}

.flip-card-back .cc-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.flip-card-back .cc-role {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.flip-card-back .cc-affil {
  font-size: 0.8rem;
  color: var(--foam);
  margin-bottom: 0.5rem;
}

.flip-card-back .cc-exp {
  font-size: 0.75rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.content-box .cc-email {
  font-size: 0.95rem;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.flip-card-back .cc-email {
  font-size: 0.85rem;
  color: var(--foam);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  transition: background 0.2s;
}

.flip-card-back .cc-email:hover {
  background: rgba(255,255,255,0.2);
}

.flip-card-back .org-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.1rem;
  color: var(--white);
}

.flip-card-back .org-loc {
  font-size: 0.8rem;
  color: var(--foam);
  margin-bottom: 0.1rem;
}

.flip-card-back .org-flag {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.flip-card-back .org-link {
  font-size: 0.8rem;
  color: var(--foam);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  transition: background 0.2s;
}

.flip-card-back .org-link:hover {
  background: rgba(255,255,255,0.25);
}

.flip-card-back .cc-detail-link {
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(47,184,200,0.4);
  padding: 0;
  background: transparent;
  border-radius: 0;
  transition: color 0.2s, text-decoration-color 0.2s;
  margin-top: 0.5rem;
  display: inline-block;
  font-weight: 500;
}

.flip-card-back .cc-detail-link:hover {
  color: var(--foam);
  text-decoration-color: var(--foam);
}

.flip-card-back .res-link {
  margin-top: 0.8rem;
}

/* ─── CAROUSEL CARDS ───────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid #dce8ee;
  border-radius: 8px;
  overflow: hidden;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--deep);
  line-height: 1.4;
}

.carousel-placeholder {
  width: 100%;
  height: 300px;
  background: var(--pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.carousel-item img {
  height: 300px;
  object-fit: contain;
}

.carousel-item img.exp-img-large {
  height: 600px;
}

.carousel-item img.exp-img-large3 {
  height: 500px;
}

.exp-info-table {
  width: 100%;
  border-collapse: collapse;
}

.exp-info-table td {
  padding: 0.75rem 0;
  vertical-align: top;
  border-bottom: 1px solid #e8f0f5;
}

.exp-info-table tr:last-child td {
  border-bottom: none;
}

.exp-info-label {
  font-weight: 600;
  color: var(--deep);
  width: 35%;
  font-size: 0.9rem;
}

.exp-info-value {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.exp-info-value a {
  color: var(--teal);
  text-decoration: none;
}

.exp-info-value a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.cc-email:hover { color: var(--accent); }
.contact-note {
  font-size: .8rem; color: var(--muted);
  text-align: center; padding-top: 1.5rem; border-top: 1px solid #dce8ee;
}

.content-box {
  background: var(--pale);
  border-radius: 8px;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.content-box h3 {
  font-size: 1.2rem;
  color: var(--deep);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.content-box h3:first-child {
  margin-top: 0;
}

.content-box p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.content-box a {
  color: var(--teal);
  text-decoration: none;
}

.content-box a:hover {
  color: var(--accent);
}

/* ─── NAVBAR DROPDOWN ───────────────────────────────── */
.dropdown-menu {
  background: var(--pale);
  border: 1px solid #dce8ee;
  border-radius: 6px;
  padding: 0.5rem 0;
}

.dropdown-item {
  color: var(--deep);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  transition: background 0.15s;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: var(--teal);
  color: var(--white);
}

.dropdown-item.active {
  font-weight: 500;
}

.nav-link.dropdown-toggle::after {
  margin-left: 0.3rem;
}

/* ─── FOOTER ────────────────────────────────────── */
footer {
  background: var(--ink); padding: 1.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.ft-copy { font-size: .75rem; color: rgba(125,216,228,.35); }
.ft-links { display: flex; gap: 1.5rem; list-style: none; }
.ft-links a { font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(125,216,228,.35); }
.ft-links a:hover { color: var(--foam); }

/* ─── REVEAL ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.vis { opacity: 1; transform: none; }



/* ─── PHONE RESPONSIVE (max-width: 576px) ───────── */
@media (max-width: 576px) {
  /* Base adjustments */
  body { font-size: 15px; }
  h2 { font-size: 1.4rem; }
  
  /* Navbar adjustments */
  .navbar { padding: 0 1rem; }
  .nav-title { font-size: 0.95rem; }
  .nav-logo-wrap img { height: 45px; }
  
  /* Hero section */
  .hero-inner { padding: 3rem 1rem 4rem; }
  .hero-logo img { width: 100%; max-width: 400px; }
  .hero-tagline { font-size: 1rem; }
  .hero-sub { font-size: 0.85rem; }
  
  /* Sections */
  .section { padding: 5rem 1rem 3.5rem; }
  .section-label { margin-top: 1rem; }
  
  /* About grid */
  .about-grid { gap: 2rem; }
  .about-lede { font-size: 1rem; padding-left: 1rem; }
  
  /* Experiment list */
  .exp-item { grid-template-columns: 45px 1fr; gap: 0.5rem; padding: 0.7rem 0; }
  .exp-n { font-size: 0.62rem; }
  .exp-t { font-size: 0.82rem; }
  
  /* Motivation grid */
  .motiv-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .motiv { padding: 0.85rem 1rem; }
  .motiv h4 { font-size: 0.68rem; }
  .motiv p { font-size: 0.78rem; }
  
  /* Resources */
  .res-tile { flex: 1 1 100%; min-width: 100%; padding: 1.25rem 1rem; }
  .res-grid { gap: 0.75rem; }
  
  /* Organizations */
  .orgs-grid { grid-template-columns: 1fr; gap: 1rem; }
  .flip-card { height: 240px; }
  .flip-card-front, .flip-card-back { padding: 1rem; }
  .flip-card-front .org-logo img { max-height: 60px; }
  .flip-card-back .org-name { font-size: 0.9rem; }
  .flip-card-back .org-loc { font-size: 0.75rem; }
  .flip-card-back .org-flag { font-size: 1.2rem; }
  .flip-card-back .org-link { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
  
  /* Events */
  .ev-row { grid-template-columns: 1fr; gap: 0.3rem; padding: 0.75rem 0; }
  .ev-date { font-size: 0.75rem; }
  .ev-desc { font-size: 0.85rem; }
  
  /* Links */
  .links-grid { grid-template-columns: 1fr; gap: 1rem; }
  .link-card { padding: 1.2rem 1.3rem; }
  
  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 1rem; }
  .flip-card { height: 240px; }
  .flip-card-front, .flip-card-back { padding: 0.9rem; }
  .flip-card-front .cc-exp-front { font-size: 0.65rem; }
  .flip-card-front h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
  .flip-card-back .cc-name { font-size: 0.9rem; margin-bottom: 0.2rem; }
  .flip-card-back .cc-role { font-size: 0.6rem; margin-bottom: 0.3rem; }
  .flip-card-back .cc-affil { font-size: 0.7rem; margin-bottom: 0.3rem; }
  .flip-card-back .cc-exp { font-size: 0.65rem; margin-bottom: 0.6rem; }
  .flip-card-back .cc-email { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
  .flip-card-back .cc-detail-link { font-size: 0.75rem; }
  
  /* Content box */
  .content-box { padding: 1.5rem; }
  .content-box h3 { font-size: 1.1rem; margin-top: 1.2rem; }
  .content-box p { font-size: 0.9rem; }

  /* Experiment info table */
  .exp-info-table td { display: block; padding: 0.5rem 0; }
  .exp-info-label { width: 100%; margin-bottom: 0.2rem; font-size: 0.85rem; }
  .exp-info-value { font-size: 0.85rem; }
  
  /* Footer */
  footer { padding: 1.25rem 1rem; }
  .ft-links { flex-direction: column; gap: 0.75rem; text-align: center; }
  
  /* Section divider */
  .section-divider { width: 30px; height: 2px; margin: 0.75rem 0 1.75rem; }
  
  /* Publication cards */
  .pub-card { padding: 1.1rem 1.2rem; }
  .pub-title { font-size: 0.92rem; }
  .pub-authors { font-size: 0.78rem; }
  
  /* Badges */
  .badges { gap: 0.3rem; }
  
  /* Table adjustments - transform to cards on mobile */
  .mtable-wrap { margin-left: -1rem; margin-right: -1rem; }
  .mtable { 
    font-size: 0.8rem; 
    display: block;
  }
  .mtable thead { display: none; }
  .mtable tbody { display: block; }
  .mtable tr { 
    display: block;
    background: var(--white);
    border: 1px solid #dce8ee;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .mtable td { 
    display: block;
    padding: 0;
    text-align: left;
    border: none;
  }
  .td-name { 
    font-size: 0.95rem; 
    font-weight: 600;
    color: var(--deep);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dce8ee;
  }
  .td-ref { 
    font-size: 0.82rem; 
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }
  .td-ref strong { font-weight: 600; color: var(--deep); }
  .td-ref a { color: var(--teal); word-break: break-word; }
  .td-dl { 
    font-size: 0.85rem;
    text-align: center;
  }
  .td-dl a { 
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--pale);
    color: var(--teal);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
  }
  .td-dl a:hover { background: rgba(47,184,200,0.15); }
}

.org-logo-duo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
}

.org-logo.org-logo-duo img {
  max-height: 55px !important;
  max-width: 70% !important;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-zoom {
  transform: scale(1.9);
}
