@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Industrial Medical Palette */
  --bg-primary: #ffffff;
  --bg-main: #ffffff;
  --bg-secondary: #f4f6f8; /* Crisp industrial gray */
  --bg-dark: #0a1128; /* Deep industrial navy */
  
  --surface-white: #ffffff;
  --surface-gray: #f1f5f9;
  --surface-dark: #121d3f;
  
  --text-primary: #0b132b;
  --text-secondary: #5a6b82;
  --text-light: #94a3b8;
  --text-inverse: #f8fafc;
  
  --accent-primary: #0077b6; /* Rich corporate medical blue */
  --accent-hover: #023e8a;
  --accent-light: #e0f2fe;
  --accent-teal: #00b4d8; /* Clinical Cyan */
  
  --border-light: #cbd5e1;
  --border-dark: #1e293b;
  
  /* Precision Layout & Utility */
  --radius-lg: 6px; /* Precise machined edge */
  --radius-md: 4px;
  --radius-sm: 2px;
  --container: min(1200px, 90vw);
  --ease: 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
  
  /* Precision Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(11, 19, 43, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(11, 19, 43, 0.05), 0 2px 4px -2px rgba(11, 19, 43, 0.05);
  --shadow-lg: 0 10px 20px -3px rgba(11, 19, 43, 0.06), 0 4px 6px -4px rgba(11, 19, 43, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(11, 19, 43, 0.08), 0 8px 10px -6px rgba(11, 19, 43, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--ease);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

/* Sections */
.section {
  padding: 6rem 0;
}

.section-bg-light {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-bg-dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

.section-header {
  margin-bottom: 3.5rem;
  max-width: 700px;
}

.section-header.text-center {
  margin-inline: auto;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  background: var(--surface-gray);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.2rem;
}

.section-bg-dark .section-tag {
  background: rgba(37, 99, 235, 0.1);
  color: #60a5fa; /* Blue 400 */
  border-color: rgba(37, 99, 235, 0.3);
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

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

.section-bg-dark .section-desc {
  color: var(--text-light);
}

.hero-title-style {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pt-0 {
  padding-top: 0 !important;
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-teal) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: white;
  stroke-width: 2.5;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-menu-cta {
  display: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface-white);
  cursor: pointer;
  padding: 0;
  transition: all var(--ease);
}

.menu-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-primary);
  transition: transform var(--ease), opacity var(--ease), background-color var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: white;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background-color: var(--surface-white);
  color: var(--accent-primary);
  box-shadow: 4px 4px 0px 0px var(--accent-primary);
  transform: translate(-3px, -3px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* Hero Section */
.hero {
  padding: 9rem 0 6rem;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(8, 145, 178, 0.03), transparent 40%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-content h1 span {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  position: relative;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0,0,0,0.05);
}

.hero-image-wrap img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.1);
}

.hero-stats {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  display: flex;
  gap: 2rem;
}

.stat-item h4 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Partners Band - Marquee */
.partners-marquee-wrapper {
  padding: 4rem 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.partners-heading {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.marquee-glass {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  padding: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  /* Gradient masks to fade out edges smoothly */
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
  gap: 5rem;
  padding-left: 5rem; /* Gap matched for seamless loop */
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 2.5rem)); } /* Moves halfway including half gap */
}

.partner-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.55;
  filter: grayscale(100%);
  transition: all var(--ease);
  cursor: default;
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  color: var(--accent-primary);
  transform: scale(1.03);
  text-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.partner-logo svg {
  transition: all var(--ease);
}

.partner-logo:hover svg {
  stroke: var(--accent-primary);
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}

/* Research Areas */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

.research-card {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.research-card-banner {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-light);
}

.research-card-body {
  padding: 2.5rem 2rem;
  flex: 1;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--accent-primary), var(--accent-teal));
  opacity: 0;
  transition: opacity var(--ease);
  z-index: 2;
}

.research-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0px 0px var(--accent-primary);
  border-color: var(--accent-primary);
}

.research-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 2;
}

.research-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.research-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Publications */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--ease);
}

.pub-item:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.pub-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 60px;
}

.pub-content h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pub-authors {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.pub-journal {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-light);
}

.pub-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.pub-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pub-link:hover {
  text-decoration: underline;
}

/* Team / Leadership */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 2rem;
}

.team-card {
  text-align: center;
}

.team-img {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--bg-secondary);
}

.team-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2);
  transition: all var(--ease);
}

.team-card:hover .team-img img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.team-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-card p {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* CTA */
.cta-box {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
  border-radius: var(--radius-lg);
  padding: 4rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83-54.627 54.627-.83-.83L54.627 0zM0 54.627l.83.83-54.627 54.627-.83-.83L0 54.627z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.cta-box h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}

.cta-box p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-inline: auto;
  position: relative; z-index: 1;
}

.cta-box .btn {
  background: white;
  color: var(--accent-primary);
  position: relative; z-index: 1;
}

.cta-box .btn:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand .brand {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 300px;
  font-size: 0.9rem;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  border-top: 1px solid var(--border-dark);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Responsive & Mobile Optimization */
@media (max-width: 1024px) {
  /* Tablets and 'Desktop Site' Mobile */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-content p {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }
  .hero-stats {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1.5rem;
    justify-content: center;
  }
  .nav {
    position: relative;
    justify-content: space-between;
    height: auto;
    padding: 1rem 0;
    gap: 1rem;
  }
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .nav > .btn.btn-primary {
    display: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 101;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-gray);
  }
  .nav-links a.nav-menu-cta {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
    background: var(--accent-primary);
    color: white !important;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
  }
  .nav-links a.nav-menu-cta:hover,
  .nav-links a.nav-menu-cta.active {
    background: var(--accent-hover);
    color: white !important;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(0, 119, 182, 0.08);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .footer-brand p {
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  /* Mobile Devices Portrait */
  .nav {
    padding: 0.9rem 0;
  }
  .btn-primary {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  .hero {
    padding: 4rem 0 2rem;
  }
  .section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .pub-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .pub-year {
    font-size: 1rem;
  }
  /* Fix Marquee for Mobile */
  .marquee-glass {
    padding: 1rem 0;
  }
  .partner-logo {
    font-size: 1rem;
  }
  /* Contact Form Mobile */
  #contact-form-grid {
    grid-template-columns: 1fr !important;
  }
  .copyright {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}
