/* =========================================================================
   HTS LAB - MODERN DESIGN SYSTEM 
   ========================================================================= */

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

:root {
  /* Core Colors */
  --color-primary: #1e3a8a;
  /* Deep brain-blue */
  --color-secondary: #0ea5e9;
  /* Light accent */
  --color-accent: #f43f5e;
  /* Vibrant red for highlights */

  /* Neutral / Backgrounds */
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* UI Elements */
  --border-radius: 12px;
  --border-radius-lg: 24px;
  --box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   BASE STYLES
   ========================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-primary);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.fixed {
  position: fixed;
}

.z-50 {
  z-index: 50;
}

.w-full {
  width: 100%;
}

/* Typography Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-4xl {
  font-size: 2.25rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

/* Spacing Helpers */
.mb-2 {
  margin-bottom: 0.5rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

/* Contact Utilities */
.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon {
  width: 20px;
  height: 20px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn-primary:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn + .btn {
  margin-left: 1rem;
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */

/* Navbar (Glassmorphism) */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--color-primary);
  /* Bold accent bar */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Subtle depth */
  transition: var(--transition-smooth);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand img {
  height: 100px;
  width: auto;
  object-fit: contain;
  display: block;
}

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

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

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-secondary);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

/* Dropdown Navigation */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: white;
  min-width: 160px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  list-style: none;
  z-index: 150;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background: rgba(30, 58, 138, 0.05);
  color: var(--color-primary);
}

/* Nested Sub-menus */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .submenu {
  position: absolute;
  top: 0;
  left: 100%;
  background: white;
  min-width: 180px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: var(--transition-smooth);
  list-style: none;
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 160;
}

.dropdown-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.submenu-toggle {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

.submenu li a {
  padding: 0.75rem 1.5rem;
  display: block;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.submenu li a:hover {
  background: rgba(30, 58, 138, 0.05);
  color: var(--color-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 8rem 0 4rem;
  background: transparent;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.5));
  z-index: -1;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.3;
  filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Card Style */
.card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
  color: white;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-about {
  flex: 1 1 360px;
}

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

.footer-description {
  color: rgba(255, 255, 255, 0.82);
  max-width: 380px;
}

.social-links {
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: white;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.social-link span {
  font-size: 0.9rem;
  line-height: 1;
}

.social-link svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 24px;
}

.social-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 24px;
}

.social-link:hover {
  opacity: 1;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex: 1 1 360px;
  margin-left: auto;
}

.footer-contact strong {
  color: white;
}

.footer-contact-inline {
  margin-top: 1.5rem;
  display: block;
}

.footer-contact-inline strong {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Hide default on mobile */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-top: 1rem;
    padding-bottom: 0;
    padding-left: 0;
    display: none;
    width: 100%;
    text-align: center;
  }

  .dropdown-menu a {
    padding: 0.5rem 1.5rem;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-submenu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    width: 100%;
    padding-left: 0;
    background: rgba(30, 58, 138, 0.03);
  }

  .dropdown-submenu.active .submenu {
    display: block;
  }

  .nav-links.show {
    display: flex;
  }

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

  .footer-contact {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }

  .footer-contact-inline {
    display: block;
  }

  .section {
    padding: 3.5rem 0 2.5rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .btn + .btn {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* =========================================================================
   LIGHTBOX GALLERY
   ========================================================================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
  max-width: 80%;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--color-secondary);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 768px) {

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* =========================================================================
   PERSON MODAL & INTERACTIVE CARDS
   ========================================================================= */

.person-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  will-change: transform;
  transform: translateZ(0);
}

.person-card>div {
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.person-card:hover {
  transform: translateY(-5px) translateZ(0);
}

.person-card:hover img {
  transform: scale(1.05) translateZ(0);
}

.person-card img {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  transform: translateZ(0);
}

.person-date-range {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
  opacity: 0.8;
}

.person-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.person-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.person-modal-content {
  background: var(--surface-color);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.person-modal-overlay.active .person-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.person-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  transition: var(--transition-smooth);
  z-index: 10;
}

.person-modal-close:hover {
  background: var(--color-accent);
  color: white;
}

.person-modal-header {
  display: flex;
  gap: 2rem;
  padding: 3rem;
  background: linear-gradient(to right, #243b55, #141e30);
  color: white;
  position: relative;
}

.person-modal-photo {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid rgba(255, 255, 255, 0.1);
  background: white;
}

.person-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.person-modal-info h2 {
  color: white;
  margin-bottom: 0.25rem;
  font-size: 2rem;
}

.person-modal-info .job-title {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.person-modal-info .email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  opacity: 0.8;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.person-modal-info .email:hover {
  opacity: 1;
}

.person-modal-contact-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.person-modal-socials {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0;
}

.person-modal-socials a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition-smooth);
}

.person-modal-socials a:hover {
  background: white;
  color: var(--color-primary);
}

.person-modal-affiliations {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.person-modal-affiliations span {
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
  opacity: 0.8;
}

.affiliation-tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.person-modal-body {
  padding: 3rem;
  background: white;
}

.person-modal-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 2.5rem;
}

.person-modal-bio p {
  margin-bottom: 1rem;
}

.modal-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-color);
}

/* Timeline */
.modal-timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

.modal-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-secondary);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--color-secondary);
  transform: translateX(-5px) translateY(-50%);
}

.timeline-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Tags */
.modal-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.modal-tag {
  background: var(--color-secondary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: stretch;
}

.people-grid .person-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.person-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.person-card-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.person-img-wrapper {
  width: 200px;
  height: 200px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .people-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .person-img-wrapper {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 768px) {
  .person-modal-overlay {
    padding: 1rem 0.5rem;
  }

  .person-modal-header {
    flex-direction: column;
    padding: 1.5rem 1rem;
  }

  .person-modal-photo {
    margin: 0 auto 1.5rem;
  }

  .person-modal-info {
    text-align: center;
    width: 100%;
  }

  .person-modal-email {
    justify-content: center;
    width: 100%;
  }

  .person-modal-socials {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .person-modal-affiliations {
    justify-content: center;
    width: 100%;
  }

  .person-modal-contact-row {
    justify-content: center;
  }

  .person-modal-body {
    padding: 1.5rem 1rem;
  }
}

/* =========================================================================
   PROJECT MODAL
   ========================================================================= */

.project-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-content {
  background: var(--surface-color);
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-modal-overlay.active .project-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.project-modal-header {
  position: relative;
  width: 100%;
  height: 300px;
  background: #e2e8f0;
  overflow: hidden;
}

.project-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  transition: var(--transition-smooth);
  z-index: 10;
}

.project-modal-close:hover {
  background: var(--color-accent);
}

.project-modal-body {
  padding: 3rem;
  background: white;
}

.project-modal-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.project-modal-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.project-modal-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 2.5rem;
}

.project-modal-desc p {
  margin-bottom: 1rem;
}

.project-tags-section {
  margin-bottom: 1.5rem;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

@media (max-width: 768px) {
  .project-modal-overlay {
    padding: 1rem 0.5rem;
  }

  .project-modal-header {
    padding: 1.5rem 1rem;
  }

  .project-modal-body {
    padding: 1.5rem 1rem;
  }
}

/* =========================================================================
   NEWS PAGE
   ========================================================================= */

/* Page Hero */
.page-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 50%, #0ea5e9 100%);
}

.page-hero-bg-overlay {
  position: absolute;
  inset: 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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.page-hero-badge span {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero-content h1 {
  color: white;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-hero-content p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 560px;
}

/* Filter Bar */
.news-filter-bar {
  background: var(--surface-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1.25rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.news-filter-inner {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.news-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid rgba(30, 58, 138, 0.15);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.news-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(30, 58, 138, 0.05);
}

.news-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

/* News Grid */
.news-section {
  padding-top: 4rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* News Card */
.news-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--box-shadow-hover);
}

.news-card-image-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  height: 210px;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

/* Category Badges */
.news-card-category-badge {
  position: absolute;
  bottom: 0.9rem;
  left: 0.9rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.award-badge {
  background: rgba(234, 179, 8, 0.9);
  color: #1a1000;
}

.publication-badge {
  background: rgba(14, 165, 233, 0.9);
  color: white;
}

.conference-badge {
  background: rgba(139, 92, 246, 0.9);
  color: white;
}

.grant-badge {
  background: rgba(34, 197, 94, 0.9);
  color: #001a08;
}

.announcement-badge {
  background: rgba(244, 63, 94, 0.9);
  color: white;
}

/* Featured tag */
.news-card-featured-tag {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.news-card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.news-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Read More Button */
.news-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.news-read-more-btn svg {
  transition: transform 0.25s ease;
}

.news-read-more-btn:hover {
  color: var(--color-primary);
}

.news-read-more-btn:hover svg {
  transform: translateX(4px);
}

/* No Results */
.news-no-results {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.news-no-results-icon {
  font-size: 3rem;
}

/* ---- News Article Modal ---- */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 2rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.news-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.news-modal-box {
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  max-width: 700px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.news-modal-overlay.active .news-modal-box {
  transform: translateY(0);
}

.news-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.news-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

.news-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Override positioning inside modal */
.news-modal-header .news-card-category-badge {
  position: static;
}

.news-modal-date-el {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.news-modal-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  line-height: 1.35;
}

.news-modal-content-body {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 0.975rem;
}

.news-modal-content-body p {
  margin-bottom: 1.1rem;
}

.news-modal-content-body p:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-modal-overlay {
    padding: 2rem 1rem;
    align-items: flex-start;
  }

  .news-modal-box {
    padding: 1.75rem;
  }

  .page-hero {
    min-height: 30vh;
    padding: 5rem 0 3rem;
  }
}

/* =========================================================================
   NEWS ARTICLE PAGE
   ========================================================================= */

/* Make card images and image-wrap clickable */
.news-card-image-wrap {
  cursor: pointer;
}

/* Article Hero */
.article-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: var(--color-primary);
}

.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  display: block;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

.article-hero-content {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
}

.article-hero-content .container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-bottom: 0.25rem;
}

.article-back-link:hover {
  color: white;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-hero-meta .news-card-category-badge {
  position: static;
}

.article-hero-date {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
}

.article-hero-title {
  color: white;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 0;
  max-width: 800px;
}

/* Article Body */
.article-body {
  padding: 4rem 0 6rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: flex-start;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content h2,
.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Article Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
}

.article-sidebar-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}

.article-sidebar-card h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.article-sidebar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  width: 100%;
  justify-content: center;
}

.article-sidebar-back-btn:hover {
  background: var(--color-secondary);
  color: white;
  transform: translateY(-2px);
}

.article-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.article-tag {
  background: rgba(30, 58, 138, 0.08);
  color: var(--color-primary);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    order: -1;
  }

  .article-hero {
    height: 300px;
  }
}

/* =========================================================================
   MOBILE — General card padding reduction
   ========================================================================= */
@media (max-width: 768px) {
  .card {
    padding: 1.25rem;
  }
}