/* ============================================================
   IAI Group — Research Website Stylesheet
   ============================================================ */

:root {
  --bg: #09090f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --surface: #15151f;
  --surface2: #1c1c2e;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(99,179,237,0.4);
  --accent: #63b3ed;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #555570;
  --nav-h: 68px;
  --radius: 12px;
  --radius-lg: 20px;
  /* theme-specific */
  --nav-bg: rgba(9,9,15,0.88);
  --nav-hover-bg: rgba(255,255,255,.05);
  --footer-bg: #060609;
  --hero-watermark: rgba(255,255,255,.04);
  --card-featured-bg: linear-gradient(145deg,#15162a,#111122);
  --canvas-line: rgba(99,179,237,0.18);
  --canvas-dot: rgba(99,179,237,0.35);
  --scrolled-shadow: 0 4px 40px rgba(0,0,0,.5);
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --bg2: #eef1f7;
  --bg3: #e6eaf4;
  --surface: #ffffff;
  --surface2: #eef1f7;
  --border: rgba(15,23,42,0.1);
  --border-hover: rgba(29,110,197,0.4);
  --accent: #1d6ec5;
  --accent2: #6d28d9;
  --accent3: #059669;
  --text: #0f172a;
  --text-muted: #4b5675;
  --text-dim: #8fa0bc;
  /* theme-specific */
  --nav-bg: rgba(245,247,251,0.92);
  --nav-hover-bg: rgba(15,23,42,.05);
  --footer-bg: #0f172a;
  --hero-watermark: rgba(15,23,42,.04);
  --card-featured-bg: linear-gradient(145deg,#e8f0fc,#edf2ff);
  --canvas-line: rgba(29,110,197,0.1);
  --canvas-dot: rgba(29,110,197,0.2);
  --scrolled-shadow: 0 4px 40px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
#navbar.scrolled { box-shadow: var(--scrolled-shadow); }

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}
/* legacy fallback */
.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--nav-hover-bg); opacity: 1; }
.nav-cta {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
}
.nav-cta:hover { opacity: .85 !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.mobile-menu a {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 8px 0;
}
.mobile-menu.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#gridCanvas {
  width: 100%;
  height: 100%;
  opacity: .35;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 80px 24px 80px 64px;
}

.hero-badge {
  display: inline-block;
  background: rgba(99,179,237,.12);
  border: 1px solid rgba(99,179,237,.3);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 24px;
  border-radius: 8px;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  display: inline-block;
}
.btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,179,237,.3);
}

.btn-ghost {
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
  display: inline-block;
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(99,179,237,.06);
  opacity: 1;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Hero visual (right side) */
.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  z-index: 1;
}
@media (max-width: 960px) { .hero-visual { display: none; } }

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99,179,237,.15);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: spin 20s linear infinite;
}
.ring-1 { width: 160px; height: 160px; border-color: rgba(99,179,237,.25); }
.ring-2 { width: 260px; height: 260px; animation-duration: 30s; animation-direction: reverse; }
.ring-3 { width: 360px; height: 360px; animation-duration: 45s; }

.orbit-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 100px; height: 100px;
}
.center-icon { width: 100%; height: 100%; }

.orbit-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent2);
  top: 50%; left: 50%;
  transform-origin: 0 0;
}
.dot-a { animation: orbitA 8s linear infinite; }
.dot-b { animation: orbitB 12s linear infinite; background: var(--accent); }
.dot-c { animation: orbitC 18s linear infinite; background: var(--accent3); }

@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes orbitA {
  from { transform: rotate(0deg) translateX(80px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}
@keyframes orbitB {
  from { transform: rotate(120deg) translateX(130px) rotate(-120deg); }
  to   { transform: rotate(480deg) translateX(130px) rotate(-480deg); }
}
@keyframes orbitC {
  from { transform: rotate(240deg) translateX(180px) rotate(-240deg); }
  to   { transform: rotate(600deg) translateX(180px) rotate(-600deg); }
}

@media (max-width: 768px) {
  .hero-content { padding: 60px 24px; }
}

/* ── ABOUT STRIP ─────────────────────────────────────────── */
.about-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg2);
}
.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.about-text strong { color: var(--text); }

/* ── SECTIONS ────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg2); }
.section-tinted { background: var(--bg3); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  margin: 8px 0;
}
.section-header p { color: var(--text-muted); font-size: .95rem; }
.section-header.light h2 { color: var(--text); }
.section-header.light p  { color: var(--text-muted); }

.section-footer {
  text-align: center;
  margin-top: 48px;
}

.section-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99,179,237,.1);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ── RESEARCH CARDS ──────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .research-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  opacity: 0;
  transition: opacity .3s;
}
.research-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.research-card:hover::before { opacity: 1; }

.research-card.featured {
  border-color: rgba(99,179,237,.25);
  background: var(--card-featured-bg);
}
.research-card.featured::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(99,179,237,.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.card-icon svg { width: 32px; height: 32px; }

.card-number {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--hero-watermark);
  line-height: 1;
  pointer-events: none;
}

.featured-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99,179,237,.12);
  border: 1px solid rgba(99,179,237,.25);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.research-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
}
.research-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-topics {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-topics li {
  font-size: .8rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.card-topics li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card-link {
  font-size: .825rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── TEAM ────────────────────────────────────────────────── */
.team-pi {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
}
@media (max-width: 700px) {
  .team-pi { flex-direction: column; align-items: center; text-align: center; }
}

.pi-avatar {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.pi-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(99,179,237,.25);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.team-tier-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.avatar-placeholder.sm {
  width: 52px;
  height: 52px;
  font-size: .95rem;
  flex-shrink: 0;
}

.member-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(99,179,237,.25);
}

.pi-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.pi-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.pi-title {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pi-bio {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 580px;
}
.pi-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  transition: color .2s, border-color .2s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color .2s, transform .2s;
}
.team-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.member-info h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.member-role {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.member-info p {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── PUBLICATIONS ────────────────────────────────────────── */
.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}
.pub-filter {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: .2s;
  font-family: 'Inter', sans-serif;
}
.pub-filter:hover, .pub-filter.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.pub-area-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}
.pub-area-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 500;
  padding: 10px 22px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.pub-area-tab:hover {
  color: var(--text);
}
.pub-area-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 540px) {
  .pub-area-tab { padding: 10px 14px; font-size: .8rem; }
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pub-item {
  display: flex;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .3s;
}
.pub-item.hidden { display: none; }
.pub-item:last-child { border-bottom: none; }

.pub-year {
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  width: 40px;
  padding-top: 2px;
}

.pub-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.pub-tag.automation { background: rgba(16,185,129,.12); color: var(--accent3); }
.pub-tag.hrc        { background: rgba(99,179,237,.12);  color: var(--accent); }
.pub-tag.embodied   { background: rgba(124,58,237,.12);  color: #a78bfa; }

.pub-content h4 {
  font-size: .975rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
}
.pub-authors { font-size: .825rem; color: var(--text-muted); margin-bottom: 3px; }
.pub-venue   { font-size: .8rem;   color: var(--text-dim); font-style: italic; margin-bottom: 10px; }
.pub-links { display: flex; gap: 12px; }
.pub-links a {
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(99,179,237,.25);
  padding: 3px 10px;
  border-radius: 5px;
  transition: background .2s;
}
.pub-links a:hover { background: rgba(99,179,237,.1); opacity: 1; }

.pub-more { text-align: center; margin-top: 40px; }

/* ── NEWS ────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.news-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.news-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.featured-news {
  grid-column: span 2;
  flex-direction: row;
  border-color: rgba(99,179,237,.25);
  background: linear-gradient(135deg, #13162a, #0f1020);
}
.featured-news .news-card-img {
  width: 340px;
  height: auto;
  min-height: 200px;
  flex-shrink: 0;
  border-bottom: none;
  border-right: 1px solid var(--border);
}
@media (max-width: 800px) {
  .featured-news { grid-column: span 1; flex-direction: column; }
  .featured-news .news-card-img { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 700px) { .featured-news { grid-column: span 1; } }

.news-date {
  font-size: .75rem;
  color: var(--text-dim);
  font-weight: 600;
}
.news-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(99,179,237,.12);
  color: var(--accent);
}
.news-card h4 {
  font-size: 1rem;
  font-weight: 600;
}
.news-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.news-card a {
  font-size: .83rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; max-width: 420px; } }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: border-color .25s, transform .25s;
}
.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(124,58,237,.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.contact-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.contact-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.contact-card a { color: var(--accent); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.contact-form input,
.contact-form textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-dim); }

.contact-form .btn-primary {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.form-note { font-size: .825rem; color: var(--accent3); }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}
.footer-left .nav-logo { display: block; margin-bottom: 12px; }
.footer-left p { font-size: .85rem; color: var(--text-muted); line-height: 1.75; max-width: 260px; }

.footer-links {
  display: flex;
  gap: 60px;
}
.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links strong {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.footer-links a {
  font-size: .875rem;
  color: var(--text-muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); opacity: 1; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-dim);
}

/* ── INITIATIVES ─────────────────────────────────────────── */
.initiatives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .initiatives-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .initiatives-grid { grid-template-columns: 1fr; } }

.initiative-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  color: var(--text);
}
.initiative-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  opacity: 1;
}

.initiative-img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.initiative-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.initiative-card:hover .initiative-img-wrap img { transform: scale(1.04); }

.initiative-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.initiative-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.initiative-tags span {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 100px;
  background: rgba(99,179,237,.1);
  color: var(--accent);
}

.initiative-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}
.initiative-sub {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.initiative-body > p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.initiative-link {
  font-size: .825rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
  display: inline-block;
}

/* ── RESEARCH VIDEO GALLERY ──────────────────────────────── */
/* ── VIDEO SHOWCASE ──────────────────────────────────────── */
.video-showcase {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Featured player */
.video-featured {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}


.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-featured-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.video-featured-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.video-featured-info p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.video-tag {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 100px;
  background: rgba(124,58,237,.12);
  color: #a78bfa;
  align-self: flex-start;
}

/* Thumbnail strip */
.video-strip-outer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.strip-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
}
.strip-arrow:hover {
  border-color: var(--accent);
  background: rgba(124,58,237,.08);
  color: var(--accent);
}
.strip-arrow:disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

.video-strip {
  flex: 1;
  display: flex;
  gap: 12px;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.video-strip::-webkit-scrollbar { display: none; }

.strip-item {
  flex-shrink: 0;
  width: 180px;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.strip-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}
.strip-item.active {
  border-color: var(--accent);
}

.strip-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.strip-item:not(.active) .strip-thumb img {
  opacity: .55;
}
.strip-item:hover .strip-thumb img,
.strip-item.active .strip-thumb img {
  opacity: 1;
}

.strip-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.strip-play-icon::after {
  content: '';
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  clip-path: polygon(36% 20%, 36% 80%, 80% 50%);
}
.strip-item.active .strip-play-icon::after {
  background: var(--accent);
}

.strip-label {
  padding: 7px 9px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.strip-item.active .strip-label {
  color: var(--text);
}

@media (max-width: 860px) {
  .video-featured {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .strip-item { width: 140px; }
}

/* ── LAB FACILITY GALLERY ────────────────────────────────── */
.facility-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .facility-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .facility-gallery { grid-template-columns: 1fr; } }

.facility-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.facility-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.facility-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface2);
  overflow: hidden;
}
.facility-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
  z-index: 1;
}
.facility-card:hover .facility-img-wrap img { transform: scale(1.05); }

.facility-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  z-index: 0;
}
.facility-img-placeholder svg { width: 48px; height: 48px; }

/* When image errors out, hide it so placeholder shows */
.facility-img-wrap.img-error img { display: none; }

.facility-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.facility-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}
.facility-body p {
  font-size: .825rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── THEME TOGGLE ─────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transition: color .2s, border-color .2s, background .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--nav-hover-bg);
}
/* dark mode shows sun, light mode shows moon */
.icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Logo swap */
.nav-logo-light,
.footer-logo-light { display: none; }
[data-theme="light"] .nav-logo-light,
[data-theme="light"] .footer-logo-light { display: block; }
[data-theme="light"] .nav-logo-dark,
[data-theme="light"] .footer-logo-dark { display: none; }

/* Light mode footer always stays dark */
footer { color: #e8e8f0; }
footer .footer-links a { color: #8888aa; }
footer .footer-links a:hover { color: #e8e8f0; }
footer .footer-left p { color: #8888aa; }
footer .footer-bottom { color: #555570; }

/* ── ADMIN NAV ICON ───────────────────────────────────────── */
.nav-admin {
  color: var(--text-dim) !important;
  font-size: 1rem;
  padding: 6px 8px !important;
}
.nav-admin:hover { color: var(--text-muted) !important; }

/* ── SCROLL ANIMATIONS ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
