/* =========================================================
GLOBAL FOUNDATION - Style D (High-tech Glass)
Mobile First Layout with Modern Lab Theme
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
  --bg1: #f0faff;
  --bg2: #e0f7ff;
  --brand: #0099cc;
  --brand-soft: #66d9ff;
  --brand-dark: #006b99;
  --brand-accent: #ff5722; /* Reddish-orange for brand title */
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(0, 180, 216, 0.15);
  --dark: #051f2e;
  --muted: #667085;
  --light-text: #f8f9fa;
  --shadow: 0 10px 40px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --max-width: 1200px;
  --radius: 18px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  overflow-x: hidden;
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



* { box-sizing: border-box; }

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* Alternating background color class */
.alt-bg {
  background: rgba(255,255,255,0.2);
}

/* Enhanced focus indicators */
*:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

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

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section + .section {
  padding-top: clamp(38px, 6vw, 72px);
}

/* Consolidated variables for glass card and spacing (merged into top :root) */
/* Removed duplicate :root to avoid conflicting variable values. */

/* GLASS */
.glass {background: var(--glass-bg);border: 1px solid var(--glass-border);backdrop-filter: blur(14px);border-radius: var(--radius);box-shadow: var(--shadow);
}


/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 80;
  backdrop-filter: blur(18px) saturate(180%);
  background: linear-gradient(120deg, rgba(255,255,255,0.92), rgba(240,250,255,0.8));
  border-bottom: 1px solid rgba(0,153,204,0.2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  min-height: clamp(56px, 7vw, 86px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(8px, 1.2vw, 14px) clamp(12px, 2.2vw, 22px);
  display: grid;
  grid-template-columns: 10fr 80fr 10fr;
  align-items: center;
  column-gap: clamp(10px, 2vw, 24px);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 4.6vw, 68px);
  height: clamp(40px, 4vw, 58px);
  padding: 4px;
  border-radius: 16px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,153,204,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.3s ease;
  justify-self: start;
}

.logo-wrapper:hover { transform: translateY(-2px); }

.logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,153,204,0.25));
}

.brand-panel {
  text-align: center;
  padding: clamp(4px, 1vw, 10px);
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  max-width: 100%;
  height: auto;
  max-height: clamp(32px, 5vw, 58px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.menu-btn {
  width: clamp(36px, 5.2vw, 48px);
  height: clamp(36px, 5.2vw, 48px);
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #00a8e8, #0077b6) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.9), rgba(0,168,232,0.4)) border-box;
  color: white;
  font-size: clamp(20px, 4vw, 24px);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,119,182,0.25);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  justify-self: end;
}

.menu-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,119,182,0.35); }
.menu-btn:active { transform: scale(0.94); }

/* MOBILE MENU DRAWER */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: rgba(255,255,255,0.85);
  border-left: 1px solid rgba(0,153,204,0.2);
  padding: 90px 24px 32px;
  backdrop-filter: blur(20px);
  box-shadow: -12px 0 32px rgba(0,0,0,0.15);
  transition: right 0.35s ease;
  z-index: 70;
  overflow-y: auto;
}

.mobile-menu.open { right: 0; }

.mobile-menu button {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.9);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  color: var(--dark);
  transition: background 0.3s ease, transform 0.2s ease;
}

.mobile-menu button:hover {
  background: linear-gradient(135deg, var(--brand), #0088bb);
  color: white;
  transform: translateX(4px);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 60;
  pointer-events: none;
  transition: background 0.3s ease;
}

.mobile-menu-overlay.visible {
  background: rgba(0,0,0,0.3);
  pointer-events: auto;
}

/* HERO - SLIDESHOW */
.hero-slideshow {
  position:relative;
  margin-top:clamp(64px, 8vh, 120px);
  height:clamp(360px, 58vh, 620px);
  padding:0;
  overflow:hidden;
  border-radius:clamp(18px, 3vw, 28px);
  box-shadow:var(--shadow-lg);
}
.section-title {
  font-size:clamp(26px, 4vw, 44px);
  font-weight:800;
  margin-bottom:16px;
  color:var(--dark);
  letter-spacing:-0.5px;
  text-align:center;
}
.section-subtitle {
  font-size:clamp(14px, 2vw, 18px);
  color:var(--muted);
  margin-bottom:42px;
  line-height:1.7;
  text-align:center;
  max-width:720px;
  margin-left:auto;
  margin-right:auto;
}

.slideshow-container { position:absolute; inset:0; width:100%; height:100%; }

.slide { position:absolute; width:100%; height:100%; opacity:0; transition:opacity 1s ease-in-out; }
.slide img { width:100%; height:100%; object-fit:cover; display:block; }
.slide.active { opacity:1; z-index:10; }

.fade { animation:fadeEffect 1s ease-in-out; }
@keyframes fadeEffect { from { opacity:0; } to { opacity:1; } }

/* Navigation arrows */
.prev, .next { 
  position:absolute; 
  top:50%; 
  transform:translateY(-50%); 
  font-size:36px; 
  color:white; 
  background:rgba(0,0,0,0.5); 
  padding:16px 20px; 
  cursor:pointer; 
  user-select:none;
  border-radius:8px;
  transition:all .3s ease;
  z-index:20;
  border:none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width:44px;
  min-height:44px;
}

.prev:hover, .next:hover { background:rgba(0,0,0,0.8); transform:translateY(-50%) scale(1.1); }
.prev:active, .next:active { transform:translateY(-50%) scale(0.95); }
.prev { left:20px; }
.next { right:20px; }

/* Dot indicators */
.dots-container { 
  position:absolute; 
  bottom:30px; 
  left:50%; 
  transform:translateX(-50%); 
  display:flex; 
  gap:12px; 
  z-index:20; 
}

.dot { 
  width:14px; 
  height:14px; 
  border-radius:50%; 
  background:rgba(255,255,255,0.5); 
  cursor:pointer; 
  transition:all .3s ease; 
  border:2px solid white;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width:44px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.dot::before {
  content:'';
  width:14px;
  height:14px;
  border-radius:50%;
  background:rgba(255,255,255,0.5);
  border:2px solid white;
  transition:all .3s ease;
}

.dot.active::before { 
  background:white; 
  width:16px; 
  height:16px; 
}

.dot:hover::before { 
  background:rgba(255,255,255,0.9); 
}

/* Overlay content */
.slideshow-overlay { 
  position:absolute; 
  inset:0; 
  background:linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%); 
  display:flex; 
  align-items:center; 
  z-index:15; 
}

.slideshow-content { 
  padding:60px; 
  max-width:800px; 
  width:100%;
  color:white; 
}

.slideshow-content h1 { 
  font-size:56px; 
  font-weight:900; 
  margin:0 0 20px; 
  letter-spacing:-1px; 
  line-height:1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

.slideshow-content p { 
  font-size:20px; 
  margin-bottom:32px; 
  opacity:.9; 
  line-height:1.8; 
  font-weight:500;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
}

.slideshow-buttons { 
  display:flex; 
  gap:16px; 
  flex-wrap:wrap; 
}

.cta-btn { 
  background:linear-gradient(135deg, var(--brand-soft), var(--brand)); 
  color:white; 
  padding:16px 36px; 
  border-radius:12px; 
  border:none; 
  cursor:pointer; 
  font-weight:700; 
  font-size:16px;
  transition:all .3s ease; 
  box-shadow:0 6px 20px rgba(0,152,204,0.4);
  text-transform:uppercase;
  letter-spacing:0.5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration:none;
  display:inline-block;
}

.cta-btn:hover { transform:translateY(-4px); box-shadow:0 10px 32px rgba(0,152,204,0.5); }
.cta-btn:active { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,152,204,0.4); }
.cta-btn.secondary { background:rgba(255,255,255,0.2); border:2px solid white; }
.cta-btn.secondary:hover { background:rgba(255,255,255,0.3); }

/* GRID SYSTEMS */
.cards, .gallery-grid, .services-grid, .industries-grid, .grid-3, .grid-4 { display:grid; gap:20px; }
.team-grid { display:flex; flex-direction:column; gap:32px; }
.team-group { display:flex; flex-direction:column; gap:12px; }
.team-group-title { margin:0; font-size:20px; font-weight:700; color:#052940; }
.team-row { display:grid; gap:20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.team-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.services-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(16px, 2vw, 28px); }
.industries-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 2vw, 28px); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.focus-layout { display:flex; flex-direction:column; gap:32px; }
.focus-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:12px;
  border-radius:var(--radius);
  border:1px solid rgba(0,180,216,0.25);
  background:rgba(255,255,255,0.55);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.6);
}
.focus-tab {
  border:none;
  border-radius:999px;
  padding:10px 22px;
  font-weight:600;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  transition:all 0.25s ease;
}
.focus-tab:hover { color:var(--dark); }
.focus-tab.active {
  color:white;
  background:linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow:0 10px 24px rgba(0,152,204,0.25);
}
.focus-panels {
  border-radius:var(--radius);
  border:1px solid var(--glass-border);
  background:var(--glass-bg);
  box-shadow:var(--shadow);
  padding: clamp(12px, 2vw, 28px);
}
.focus-panel {
  display:none;
  animation:panelFade 0.45s ease;
}
.focus-panel.active { display:block; }

@keyframes panelFade {
  from { opacity:0; transform:translateY(15px); }
  to { opacity:1; transform:translateY(0); }
}

.horizontal-scroll {
  --scroll-card-width: minmax(260px, clamp(280px, 28vw, 360px));
}

@media (max-width:900px) {
  .horizontal-scroll {
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:var(--scroll-card-width);
    overflow-x:auto;
    padding-bottom:6px;
    gap:clamp(16px, 4vw, 28px);
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .horizontal-scroll::-webkit-scrollbar { display:none; }
  .horizontal-scroll > * { scroll-snap-align:start; }
  .equipment-grid.horizontal-scroll { padding-bottom:12px; }
}

.news-stream.horizontal-scroll {
  --scroll-card-width: minmax(240px, clamp(260px, 25vw, 340px));
}

.equipment-grid.horizontal-scroll {
  --scroll-card-width: minmax(260px, clamp(320px, 36vw, 420px));
}

/* CARDS */
.card { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); padding:28px; border-radius:var(--radius); transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card:hover { transform:translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); border-color: rgba(0,180,216,0.3); }
.card-icon { font-size:32px; margin-bottom:12px; }
.card h3 { font-size:18px; margin:0 0 8px; color:var(--dark); }
.card p { font-size:14px; color:var(--muted); margin:0; line-height:1.6; }
.service-card { border-left:4px solid var(--brand); position:relative; }
.service-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg, var(--brand), var(--brand-soft)); }
.industry-card { display:flex; flex-direction:column; align-items:center; text-align:center; padding:24px !important; }
.industry-icon { font-size:40px; margin-bottom:16px; }

/* TEAM */
.team-grid .member { padding:0; display:flex; flex-direction:column; cursor:pointer; }
.team-grid .member > img { width:100%; height:260px; object-fit:cover; border-radius:var(--radius); margin-bottom:16px; transition:transform .2s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.team-grid .member:hover img { transform:scale(1.05); box-shadow: 0 8px 20px rgba(0,180,216,0.2); }
.team-grid .member > div { padding:0 4px; }
.team-grid .member h4 { font-size:18px; font-weight:700; margin:0 0 6px; color:#052940; letter-spacing:-0.3px; }
.team-grid .member p { font-size:14px; color:#00b4d8; margin:0 0 10px; font-weight:600; }
.team-grid .member p .designation { font-size:12px; color:#666; font-weight:500; }
.team-grid .member a { font-size:13px; color:#0077a3; text-decoration:none; font-weight:500; transition:color .2s ease; display:block; margin-top:4px; }
.team-grid .member a:hover { color:#005a7d; text-decoration:underline; }
.scholar-link {
  color:#00b4d8;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
  font-size:13px;
}
.scholar-link:hover { color:#0099b3; }
.scholar-link .scholar-icon {
  width:14px;
  height:14px;
  display:inline-block;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  flex-shrink:0;
}
.team-grid .member .scholar-link { margin-top:8px; font-size:12px; }

/* PROFILE MODAL */
.profile-modal { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; padding:20px; z-index:9999; animation:fadeIn .3s ease; overflow-y:auto; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.profile-content { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(18px); border-radius:var(--radius); max-width:500px; width:100%; padding:30px; position:relative; animation:slideUp .3s ease; 
  /* Constrain height to viewport so modal always fits and becomes scrollable if needed */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-sizing: border-box;
  margin: auto;
}
@keyframes slideUp { from { transform:translateY(20px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.profile-close { position:absolute; top:15px; right:15px; background:var(--brand); width:36px; height:36px; border-radius:50%; color:white; border:none; font-size:20px; cursor:pointer; transition:all .2s ease; }
.profile-close:hover { background:#0099b3; transform:scale(1.1); }
.profile-image { width:160px; height:160px; border-radius:50%; object-fit:cover; margin-bottom:24px; border:4px solid #00b4d8; box-shadow: 0 8px 24px rgba(0,180,216,0.3); }
.profile-name { font-size:28px; font-weight:800; color:#052940; margin:0 0 10px; letter-spacing:-0.5px; }
.profile-role { font-size:18px; color:#005a7d; margin:0 0 20px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; }
.profile-bio { font-size:15px; color:#333; line-height:1.9; margin:18px 0; font-weight:500; }
.profile-details { margin-top:24px; padding-top:24px; border-top:2px solid #00b4d8; }
.profile-detail { margin-bottom:16px; font-size:14px; }
.profile-detail strong { color:#052940; font-weight:700; display:block; margin-bottom:4px; font-size:13px; text-transform:uppercase; letter-spacing:0.3px; }
.profile-detail a { color:#0077a3; text-decoration:none; font-weight:600; }
.profile-detail a:hover { text-decoration:underline; color:#005a7d; }

/* GALLERY */
.gallery-grid img {
  width:100%;
  height:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  border-radius:var(--radius);
  border:1px solid var(--glass-border);
  box-shadow:0 12px 30px rgba(5,31,46,0.12);
  cursor:pointer;
  transition:transform .3s ease, box-shadow .3s ease;
}
.gallery-grid img:hover {
  transform:translateY(-4px) scale(1.02);
  box-shadow:0 18px 42px rgba(5,31,46,0.2);
}

/* MODAL (Gallery Viewer) */
.modal { position:fixed; inset:0; background:rgba(0,0,0,0.75); display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px; z-index:100; text-align:center; }
.modal-img { max-width:90%; max-height:80vh; border-radius:var(--radius); display:block; margin:0 auto; }
.modal-close { position:absolute; top:20px; right:20px; background:var(--brand); width:44px; height:44px; border-radius:50%; color:white; border:none; font-size:22px; cursor:pointer; }
.modal-prev, .modal-next { position:absolute; top:50%; font-size:42px; background:none; border:none; color:white; cursor:pointer; transform:translateY(-50%); }
.modal-prev { left:22px; } .modal-next { right:22px; }

/* FOOTER */
.footer { background: linear-gradient(135deg, rgba(5,31,40,0.95), rgba(5,41,64,0.95)); color:#d9edf7; padding:50px 0 25px; margin-top:80px; border-top: 1px solid rgba(0,180,216,0.1); }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:30px; margin-bottom:30px; }
.footer h4 { color:white; font-size:16px; margin:0 0 12px; }
.footer a { color:#d9edf7; text-decoration:none; font-size:14px; display:block; margin-bottom:8px; transition:color .2s ease; }
.footer a:hover { color:var(--brand-soft); }
.footer-bottom { border-top:1px solid rgba(255,255,255,0.1); padding-top:20px; text-align:center; font-size:13px; }

/* SCROLL REVEAL */
.reveal { opacity:0; transform:translateY(30px); transition:0.8s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

@media (max-width:800px) {
  .container { padding:0 16px; }
  .header-inner {
    gap:8px;
    padding:8px 12px;
    grid-template-columns: 12fr 76fr 12fr;
  }
  .logo-wrapper { width:48px; height:40px; padding:4px; }
  .menu-btn { width:40px; height:40px; }
  .brand-title {
    max-height: clamp(28px, 4.5vw, 48px);
  }
  .mobile-menu { width:280px; right:-280px; }
  .mobile-menu.open { right:0; }
  .mobile-menu button { padding:16px; margin-bottom:10px; font-size:15px; }
  .hero-slideshow { height:55vh; min-height:400px; margin-top:75px; border-radius:16px; }
  .slideshow-overlay { background:linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 100%); }
  .slideshow-content { padding:40px 24px; }
  .slideshow-content h1 { font-size:36px; margin-bottom:16px; line-height:1.2; text-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4); }
  .slideshow-content p { font-size:16px; margin-bottom:24px; line-height:1.6; max-width:500px; text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3); }
  .slideshow-buttons { gap:12px; }
  .cta-btn { padding:14px 28px; font-size:14px; white-space:nowrap; }
  .prev, .next { font-size:32px; padding:12px 16px; width:48px; height:48px; }
  .prev { left:12px; }
  .next { right:12px; }
  .dots-container { bottom:20px; gap:10px; }
  .dot { width:12px; height:12px; min-width:40px; min-height:40px; }
  .dot::before { width:12px; height:12px; }
  .dot.active::before { width:14px; height:14px; }
  .section { padding:48px 0; }
  .section-title { font-size:32px; margin-bottom:12px; }
  .section-subtitle { font-size:16px; margin-bottom:40px; }
  .cards { grid-template-columns:1fr; gap:16px; }
  .team-row { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:20px; }
  .team-grid .member > img { height:220px; }
  .services-grid { grid-template-columns:1fr; gap:20px; }
  .industries-grid { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:16px; }
  .funding-grid { grid-template-columns:1fr; gap:20px; }
  .funding-card { padding:24px; }
  .funding-stats { grid-template-columns:1fr; gap:24px; }
  .publications-carousel { padding:0 50px; }
  .publication-card { padding:28px 20px; }
  .pub-title { font-size:19px; }
  .pub-abstract { font-size:13px; line-height:1.6; }
  .pub-arrow { width:40px; height:40px; font-size:24px; }
  .equipment-grid { grid-template-columns:1fr; gap:20px; }
  .stats-grid { grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:24px; }
  .stat-number { font-size:40px; }
  .stat-label { font-size:14px; }
  .contact-form { padding:30px 20px; }
  .form-group input, .form-group textarea { padding:12px 14px; font-size:15px; }
  .profile-content { max-width:90%; padding:24px; max-height:calc(100vh - 60px); overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .profile-image { width:140px; height:140px; }
  .profile-name { font-size:24px; }
  .profile-role { font-size:16px; }
  .profile-bio { font-size:14px; }
  .footer-grid { grid-template-columns:1fr; gap:24px; }
}

/* STATISTICS */
.stats-section { background: linear-gradient(135deg, var(--brand), #0088bb); color:white; padding:clamp(48px, 8vw, 80px) 0; margin:clamp(40px, 7vw, 90px) 0; box-shadow: 0 20px 60px rgba(0,152,204,0.2); }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:40px; text-align:center; }
.stat-item { display:flex; flex-direction:column; align-items:center; }
.stat-number { font-size:52px; font-weight:800; margin-bottom:10px; font-variant-numeric:tabular-nums; letter-spacing: -1px; }
.stat-label { font-size:16px; opacity:.95; font-weight:500; letter-spacing: 0.3px; }

/* CONTACT */
.contact-section { background:rgba(255,255,255,0.1); padding:80px 0; }
.contact-form { max-width:600px; margin:50px auto; background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); padding:50px; border-radius:var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.form-group { margin-bottom:20px; display:flex; flex-direction:column; }
.form-group label { font-weight:600; margin-bottom:6px; color:var(--dark); font-size:14px; }
.form-group input, .form-group textarea { padding:14px 16px; border:1px solid rgba(0,180,216,0.2); border-radius:10px; background:rgba(255,255,255,0.7); font-family:inherit; font-size:14px; color:var(--dark); transition:all .3s ease; }
.form-group input:focus, .form-group textarea:focus { outline:none; background:white; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,180,216,0.1); }
.form-group textarea { resize:vertical; min-height:120px; }
.form-submit { background: linear-gradient(135deg, var(--brand), #0088bb); color:white; padding:13px 32px; border:none; border-radius:10px; font-weight:700; cursor:pointer; transition:all .3s ease; align-self:flex-start; box-shadow: 0 4px 14px rgba(0,152,204,0.3); }
.form-submit:hover { transform:translateY(-3px); box-shadow: 0 8px 24px rgba(0,152,204,0.4); }

/* BREADCRUMB */
.breadcrumb { display:flex; gap:8px; align-items:center; font-size:13px; color:var(--muted); margin-bottom:20px; flex-wrap:wrap; }
.breadcrumb a { color:var(--brand); text-decoration:none; transition:color .2s ease; }
.breadcrumb a:hover { color:#0099b3; text-decoration:underline; }
.breadcrumb-separator { color:var(--muted); opacity:.5; }

/* EQUIPMENT CARDS */
.equipment-grid { display:grid; gap:24px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.equipment-card { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); border-radius:var(--radius); overflow:hidden; transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease; padding:0; }
.equipment-card:hover { transform:translateY(-8px); box-shadow: 0 20px 52px rgba(0,0,0,0.14); border-color: rgba(0,180,216,0.3); }
.equipment-image { width:100%; height:200px; overflow:hidden; background:rgba(0,180,216,0.1); display:flex; align-items:center; justify-content:center; }
.equipment-image img { width:100%; height:100%; object-fit:contain; transition:transform .3s ease; }
.equipment-card:hover .equipment-image img { transform:scale(1.05); }
.equipment-card h3 { font-size:18px; font-weight:700; margin:16px 16px 8px; color:var(--dark); }
.equipment-card p { font-size:14px; color:var(--muted); margin:0 16px 16px; line-height:1.6; }

/* PROJECTS SECTION */
.projects-grid { display:grid; gap:32px; margin-top:40px; }
.project-card { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); border-radius:var(--radius); overflow:hidden; transition:all .4s cubic-bezier(0.4, 0, 0.2, 1); position:relative; }
.project-card:hover { transform:translateY(-6px); box-shadow: 0 20px 60px rgba(0,152,204,0.15); border-color: rgba(0,180,216,0.4); }

.project-status { position:absolute; top:20px; right:20px; z-index:10; background:linear-gradient(135deg, var(--brand), var(--brand-dark)); color:white; padding:8px 16px; border-radius:20px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; box-shadow: 0 4px 12px rgba(0,152,204,0.3); }
.project-status.completed { background:linear-gradient(135deg, #10b981, #059669); }

.project-image { width:100%; height:300px; overflow:hidden; background:rgba(0,180,216,0.05); position:relative; }
.project-image img { width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.project-card:hover .project-image img { transform:scale(1.08); }

.project-content { padding:32px; }
.project-title { font-size:24px; font-weight:800; margin:0 0 16px; color:var(--dark); line-height:1.3; }
.project-description { font-size:15px; color:var(--muted); line-height:1.8; margin:0 0 24px; }

.project-details { display:grid; gap:16px; margin-bottom:24px; padding:20px; background:rgba(0,180,216,0.05); border-radius:12px; border-left:4px solid var(--brand); }
.project-detail { display:flex; align-items:baseline; gap:8px; }
.detail-label { font-size:13px; font-weight:700; color:var(--brand); text-transform:uppercase; letter-spacing:0.5px; min-width:90px; }
.detail-value { font-size:14px; color:var(--dark); font-weight:500; }

.project-highlights { margin-bottom:24px; }
.project-highlights h4 { font-size:16px; font-weight:700; color:var(--dark); margin:0 0 12px; }
.project-highlights ul { margin:0; padding-left:20px; }
.project-highlights li { font-size:14px; color:var(--muted); line-height:1.8; margin-bottom:8px; }
.project-highlights li::marker { color:var(--brand); }

.project-tags { display:flex; flex-wrap:wrap; gap:10px; }
.tag { display:inline-block; background:linear-gradient(135deg, rgba(0,152,204,0.1), rgba(0,180,216,0.15)); color:var(--brand); padding:6px 14px; border-radius:20px; font-size:12px; font-weight:600; border:1px solid rgba(0,180,216,0.2); transition:all .3s ease; }
.tag:hover { background:linear-gradient(135deg, var(--brand), var(--brand-dark)); color:white; transform:translateY(-2px); box-shadow: 0 4px 12px rgba(0,152,204,0.25); }

.project-meta { display:flex; align-items:center; gap:12px; font-size:13px; color:var(--muted); margin-top:16px; font-weight:500; }

/* Featured project styling */
.project-card.featured { grid-column:1 / -1; }
.project-card.featured .project-image { height:400px; }
.project-card.featured .project-title { font-size:28px; }
.project-card.featured .project-description { font-size:16px; }

/* Responsive grid for smaller projects */
@media (min-width: 768px) {
  .projects-grid { grid-template-columns:repeat(auto-fit, minmax(350px, 1fr)); }
}

/* FUNDING SECTION */
.funding-grid { display:grid; gap:24px; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); margin-bottom:60px; }
.funding-card { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); padding:32px; border-radius:var(--radius); transition:transform .3s ease, box-shadow .3s ease; position:relative; overflow:hidden; }
.funding-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg, var(--brand), var(--brand-soft)); }
.funding-card:hover { transform:translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
.funding-logo { width:80px; height:80px; margin:0 auto 20px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, var(--brand-soft), var(--brand)); border-radius:50%; }
.funding-icon { font-size:36px; }
.funding-card h3 { font-size:20px; font-weight:700; margin:0 0 12px; color:var(--dark); text-align:center; }
.funding-amount { font-size:24px; font-weight:800; color:var(--brand); margin:0 0 16px; text-align:center; }
.funding-description { font-size:14px; color:var(--muted); line-height:1.7; margin:0 0 16px; }
.funding-year { display:inline-block; background:rgba(0,180,216,0.1); color:var(--brand); padding:6px 12px; border-radius:6px; font-size:13px; font-weight:600; }
.funding-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:30px; margin-top:60px; padding-top:60px; border-top:2px solid rgba(0,180,216,0.2); }
.funding-stat-item { text-align:center; }
.funding-stat-number { font-size:48px; font-weight:800; color:var(--brand); margin-bottom:8px; }
.funding-stat-label { font-size:16px; color:var(--muted); font-weight:500; }

/* PARTNERS SECTION */
.partners-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:30px; align-items:center; justify-items:center; margin-top:40px; max-width:700px; margin-left:auto; margin-right:auto; }
.partner-logo { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); padding:24px; border-radius:var(--radius); transition:transform .3s ease, box-shadow .3s ease; text-align:center; width:100%; max-width:280px; }
.partner-logo:hover { transform:translateY(-8px); box-shadow: 0 20px 52px rgba(0,0,0,0.14); }
.partner-logo img { width:100%; max-width:140px; height:auto; object-fit:contain; margin:0 auto 16px; display:block; filter:grayscale(30%); transition:filter .3s ease; }
.partner-logo:hover img { filter:grayscale(0%); }
.partner-name { font-size:14px; font-weight:600; color:var(--dark); margin:0; line-height:1.4; }

/* PUBLICATIONS CAROUSEL */
.publications-carousel { position:relative; max-width:900px; margin:0 auto 40px; padding:0 60px; }
.publications-track { overflow:hidden; position:relative; min-height:500px; }
.publication-card { background:var(--glass-bg); border:1px solid var(--glass-border); backdrop-filter:blur(14px); padding:40px; border-radius:var(--radius); box-shadow:var(--shadow); position:absolute; width:100%; opacity:0; transform:translateX(100%); transition:all .5s ease; pointer-events:none; }
.publication-card.active { opacity:1; transform:translateX(0); pointer-events:auto; z-index:2; }
.publication-card.prev { opacity:0; transform:translateX(-100%); }
.pub-badge { display:inline-block; background:linear-gradient(135deg, var(--brand), var(--brand-soft)); color:white; padding:6px 14px; border-radius:6px; font-size:12px; font-weight:700; text-transform:uppercase; margin-bottom:16px; letter-spacing:0.5px; }
.pub-title { font-size:22px; font-weight:700; color:var(--dark); margin:0 0 12px; line-height:1.4; }
.pub-authors { font-size:14px; color:var(--brand); font-weight:600; margin:0 0 8px; font-style:italic; }
.pub-journal { font-size:13px; color:var(--muted); margin:0 0 16px; }
.pub-abstract { font-size:14px; color:var(--dark); line-height:1.8; margin:0 0 20px; }
.pub-metrics { display:flex; gap:24px; margin:0 0 24px; flex-wrap:wrap; }
.pub-metric { font-size:13px; color:var(--muted); }
.pub-links { display:flex; gap:12px; flex-wrap:wrap; }
.pub-link { display:inline-flex; align-items:center; gap:8px; background:linear-gradient(135deg, var(--brand), var(--brand-soft)); color:white; padding:10px 20px; border-radius:8px; text-decoration:none; font-weight:600; font-size:14px; transition:all .3s ease; }
.pub-link:hover { transform:translateY(-2px); box-shadow: 0 6px 20px rgba(0,180,216,0.3); }
.pub-link.secondary { background:rgba(0,180,216,0.1); color:var(--brand); }
.scholar-logo { height:16px; width:auto; }
.pub-arrow { position:absolute; top:50%; transform:translateY(-50%); background:var(--brand); color:white; border:none; width:44px; height:44px; border-radius:50%; font-size:28px; cursor:pointer; transition:all .3s ease; z-index:3; display:flex; align-items:center; justify-content:center; box-shadow: 0 4px 12px rgba(0,180,216,0.3); }
.pub-arrow:hover { transform:translateY(-50%) scale(1.1); box-shadow: 0 6px 20px rgba(0,180,216,0.4); }
.pub-prev { left:0; }
.pub-next { right:0; }
.pub-dots { display:flex; justify-content:center; gap:12px; margin-bottom:40px; }
.pub-dot { width:12px; height:12px; border-radius:50%; background:rgba(0,180,216,0.3); cursor:pointer; transition:all .3s ease; }
.pub-dot.active { background:var(--brand); width:32px; border-radius:6px; }
.pub-view-all { text-align:center; }

@media (max-width:640px) {
  body { padding:0 14px; }
  .header {
    padding:clamp(8px, 1.5vw, 12px) 10px;
  }
  .header-inner {
    padding:0;
    gap:8px;
    grid-template-columns: 14fr 72fr 14fr;
  }
  .brand-panel {
    max-width:100%;
    width:100%;
    padding:6px;
    min-height:auto;
  }
  .brand-title {
    max-height: clamp(24px, 4vw, 40px);
  }
  .menu-btn { margin-left: auto; width:38px; height:38px; }
  .container { padding:0 12px; }
  /* Header elements scale automatically via clamp */
  .header .inner { gap: 4px; }
  .mobile-menu { padding:60px 16px; }
  .mobile-menu button { padding:14px; font-size:14px; }
  .hero-slideshow { height:46vh; min-height:320px; margin-top:64px; border-radius:14px; }
  .slideshow-overlay { background:linear-gradient(200deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 100%); align-items:flex-end; padding:0 16px 28px; }
  .slideshow-content { padding:16px 12px; max-width:520px; }
  .slideshow-content h1 { font-size:clamp(22px, 7vw, 32px); margin-bottom:10px; line-height:1.15; text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 4px rgba(0,0,0,0.5); }
  .slideshow-content p { font-size:15px; margin-bottom:18px; line-height:1.5; max-width:100%; text-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4); }
  .slideshow-buttons { gap:10px; }
  .cta-btn { padding:14px 24px; font-size:14px; text-align:center; }
  .prev, .next { font-size:28px; padding:10px 12px; width:44px; height:44px; border-radius:50%; }
  .prev { left:8px; }
  .next { right:8px; }
  .dots-container { bottom:16px; gap:8px; }
  .dot { min-width:36px; min-height:36px; }
  .dot::before { width:10px; height:10px; }
  .dot.active::before { width:12px; height:12px; }
  .section { padding:28px 0; }
  .section-title { font-size:26px; margin-bottom:10px; }
  .section-subtitle { font-size:13px; margin-bottom:26px; }
  .focus-tabs {
    padding:10px;
    overflow-x:auto;
    justify-content:flex-start;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .focus-tabs::-webkit-scrollbar { display:none; }
  .focus-tab {
    flex:0 0 auto;
    min-width:140px;
    text-align:center;
    scroll-snap-align:start;
  }
  .horizontal-scroll { grid-auto-columns: minmax(220px, 74vw); }
  .cards { gap:14px; }
  .card { padding:20px; }
  .card h3 { font-size:16px; }
  .card p { font-size:13px; }
  .team-row {
    grid-auto-flow:column;
    grid-auto-columns:minmax(240px, 78vw);
    overflow-x:auto;
    padding-bottom:10px;
    scroll-snap-type:x proximity;
    gap:16px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .team-grid::-webkit-scrollbar { display:none; }
  .team-grid .member { scroll-snap-align:start; }
  .team-grid .member > img { height:260px; }
  .services-grid { gap:16px; }
  .service-card { padding:20px; }
  .industries-grid { grid-template-columns:1fr; gap:14px; }
  .industry-card { padding:20px !important; }
  .funding-grid { gap:16px; }
  .funding-card { padding:20px; }
  .funding-logo { width:60px; height:60px; }
  .funding-icon { font-size:28px; }
  .funding-card h3 { font-size:18px; }
  .funding-amount { font-size:20px; }
  .funding-description { font-size:13px; }
  .funding-stats { gap:20px; margin-top:40px; padding-top:40px; }
  .funding-stat-number { font-size:36px; }
  .funding-stat-label { font-size:14px; }
  .publications-carousel { padding:0 28px; margin-bottom:28px; }
  .publications-track { min-height:520px; }
  .publication-card { padding:24px 16px; }
  .pub-badge { font-size:11px; padding:5px 10px; margin-bottom:12px; }
  .pub-title { font-size:17px; line-height:1.3; margin-bottom:10px; }
  .pub-authors { font-size:12px; margin-bottom:6px; }
  .pub-journal { font-size:12px; margin-bottom:12px; }
  .pub-abstract { font-size:12px; line-height:1.5; margin-bottom:16px; display:-webkit-box; line-clamp:3; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .pub-metrics { display:flex; gap:16px; margin-bottom:16px; flex-direction:column; }
  .pub-metric { font-size:12px; }
  .pub-links { flex-direction:column; gap:10px; }
  .pub-link { padding:10px 16px; font-size:13px; text-align:center; }
  .pub-arrow { width:36px; height:36px; font-size:22px; }
  .pub-dots { gap:8px; margin-bottom:30px; }
  .pub-dot { width:10px; height:10px; }
  .pub-dot.active { width:24px; }
  .equipment-grid { gap:16px; }
  .equipment-card h3 { font-size:16px; }
  .equipment-card p { font-size:13px; }
  .equipment-image { height:180px; }
  .projects-grid {
    gap:16px;
    grid-auto-flow:column;
    grid-auto-columns:minmax(260px, 82vw);
    overflow-x:auto;
    padding-bottom:10px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .projects-grid::-webkit-scrollbar { display:none; }
  .project-card.featured .project-image { height:280px; }
  .project-card.featured .project-title { font-size:22px; }
  .project-content { padding:24px; }
  .project-title { font-size:20px; }
  .project-image { height:240px; }
  .stats-section { padding:44px 0; margin:36px 0; }
  .stats-grid { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:22px; }
  .stat-number { font-size:42px; }
  .stat-label { font-size:14px; }
  .contact-section { padding:50px 0; }
  .contact-form { padding:24px 16px; }
  .form-group { margin-bottom:16px; }
  .form-group label { font-size:13px; }
  .form-group input, .form-group textarea { padding:12px; font-size:14px; }
  .form-group textarea { min-height:100px; }
  .form-submit { width:100%; padding:14px; font-size:14px; }
  .profile-content { padding:20px; max-height:calc(100vh - 40px); overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .profile-close { width:32px; height:32px; font-size:18px; top:12px; right:12px; }
  .profile-image { width:120px; height:120px; margin-bottom:16px; }
  .profile-name { font-size:22px; margin-bottom:8px; }
  .profile-role { font-size:14px; margin-bottom:16px; }
  .profile-bio { font-size:13px; line-height:1.7; margin:12px 0; }
  .profile-details { margin-top:20px; padding-top:20px; }
  .profile-detail { margin-bottom:12px; font-size:13px; }
  .profile-detail strong { font-size:12px; }
  .footer { padding:40px 0 20px; margin-top:60px; }
  .footer-grid { gap:20px; }
  .footer h4 { font-size:15px; margin-bottom:10px; }
  .footer a { font-size:13px; margin-bottom:6px; }
  .footer-bottom { padding-top:16px; font-size:12px; }
  .modal { padding:20px; }
  .modal-img { max-width:95%; max-height:70vh; }
  .modal-close { width:40px; height:40px; font-size:20px; top:15px; right:15px; }
  .modal-prev, .modal-next { font-size:36px; }
  .modal-prev { left:10px; }
  .modal-next { right:10px; }
}

/* EXTRA SMALL DEVICES (< 400px) */
@media (max-width:400px) {
  body { padding:0 12px; }
  .container { padding:0 10px; }
  .brand-panel { padding:6px; }
  /* Ultra-small screens - minimal overrides needed */
  .brand-title {
    max-height: clamp(20px, 4.5vw, 36px);
  }
  .hero-slideshow { height:45vh; min-height:320px; margin-top:65px; border-radius:10px; }
  .slideshow-overlay { padding-top:50px; }
  .slideshow-content { padding:16px 12px; }
  .slideshow-content h1 { font-size:22px; margin-bottom:10px; text-shadow: 0 2px 10px rgba(0,0,0,0.7), 0 1px 5px rgba(0,0,0,0.5); }
  .slideshow-content p { font-size:13px; margin-bottom:16px; line-height:1.4; text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.4); }
  .slideshow-buttons { flex-wrap:wrap; }
  .cta-btn { padding:12px 20px; font-size:13px; }
  .prev, .next { font-size:24px; padding:8px 10px; width:40px; height:40px; }
  .prev { left:6px; }
  .next { right:6px; }
  .dots-container { bottom:12px; gap:6px; }
  .dot { min-width:32px; min-height:32px; }
  .dot::before { width:8px; height:8px; }
  .dot.active::before { width:10px; height:10px; }
  .slideshow-content h1 { font-size:20px; }
  .slideshow-content p { font-size:12px; }
  .section { padding:40px 0; }
  .section-title { font-size:22px; }
  .section-subtitle { font-size:13px; }
  .focus-tabs { padding:10px; }
  .focus-tab { min-width:65%; text-align:center; }
  .horizontal-scroll { grid-auto-columns: minmax(210px, 90vw); }
  .card { padding:16px; }
  .team-grid .member > img { height:240px; }
  .publications-carousel { padding:0 35px; }
  .publications-track { min-height:580px; }
  .publication-card { padding:20px 12px; }
  .pub-title { font-size:15px; }
  .pub-abstract { display:-webkit-box; -webkit-line-clamp:4; line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
  .pub-arrow { width:32px; height:32px; font-size:20px; }
  .stats-grid { gap:24px; }
  .stat-number { font-size:36px; }
}

/* PRINT STYLES */
@media print {
  .header, .mobile-menu, .menu-btn, .hero-slideshow .prev, .hero-slideshow .next, .dots-container { display: none; }
  body { background: white; }
  .section { page-break-inside: avoid; padding: 20px 0; }
  .card, .team-grid .member { page-break-inside: avoid; }
  a[href]:after { content: " (" attr(href) ")"; }
  .section-title { color: #000; }
}