/* ==========================================================================
   GAG Computational Group — Modern Design System
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --clr-bg: #f4f6fb;
  --clr-surface: #ffffff;
  --clr-surface-alt: #edf1fa;
  --clr-primary: #1a3a6b;
  --clr-primary-light: #2d5aa0;
  --clr-primary-dark: #0f0c29;
  --clr-accent: #4a7cff;
  --clr-accent-glow: rgba(74, 124, 255, .25);
  --clr-text: #2c3e50;
  --clr-text-light: #6c7a89;
  --clr-text-inverse: #f0f4ff;
  --clr-border: rgba(0, 0, 0, .08);
  --clr-highlight: #e8c547;

  /* Shorthand aliases (used in inline styles) */
  --accent: #4a7cff;
  --gray-100: #f4f6fb;
  --gray-400: #9ca3af;
  --gray-500: #6c7a89;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --grad-card: linear-gradient(135deg, rgba(255, 255, 255, .85) 0%, rgba(240, 244, 255, .75) 100%);
  --grad-accent: linear-gradient(135deg, #4a7cff 0%, #7c5cfc 100%);

  /* Typography */
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.75rem;
  --fs-hero: clamp(2.2rem, 5vw, 3.5rem);

  /* Spacing */
  --sp-xs: .25rem;
  --sp-sm: .5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-section: clamp(3rem, 6vw, 5rem);

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .1);
  --shadow-glow: 0 0 30px var(--clr-accent-glow);
  --transition: .3s ease;
  --nav-height: 72px;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-accent);
  z-index: 1100;
  transition: width .05s linear;
  box-shadow: 0 0 8px rgba(74, 124, 255, .5);
}

/* ---------- Keyframes ---------- */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(-15px) rotate(1deg);
  }

  66% {
    transform: translateY(8px) rotate(-1deg);
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(10px) rotate(-1deg);
  }

  66% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: .15;
    transform: scale(1);
  }

  50% {
    opacity: .25;
    transform: scale(1.05);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--clr-primary);
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: var(--fs-hero);
}

h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-lg);
}

h3 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-md);
}

h4 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-sm);
}

p {
  margin-bottom: var(--sp-md);
}

hr {
  border: none;
  height: 1px;
  background: var(--clr-border);
  margin: var(--sp-xl) 0;
}

/* ---------- Container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition), background var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--clr-primary);
  margin-right: var(--sp-xl);
  flex-shrink: 0;
}

.nav-brand img {
  height: 42px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links>li>a {
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-links>li>a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 1px;
  transition: width var(--transition), left var(--transition);
}

.nav-links>li>a:hover::after,
.nav-links>li>a.active::after {
  width: 60%;
  left: 20%;
}

.nav-links>li>a:hover,
.nav-links>li>a.active {
  color: var(--clr-accent);
  background: rgba(74, 124, 255, .06);
}

/* Dropdown */
.dropdown>a::after {
  content: '▾';
  margin-left: 4px;
  font-size: .7em;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-sm) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}

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

.dropdown-menu a {
  display: block;
  padding: var(--sp-sm) var(--sp-lg);
  font-size: var(--fs-sm);
  color: var(--clr-text);
}

.dropdown-menu a:hover {
  background: var(--clr-surface-alt);
  color: var(--clr-accent);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-sm);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero / Page Header ---------- */
.hero {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 30%, #24243e 60%, #1a1a3e 100%);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  color: var(--clr-text-inverse);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74, 124, 255, .2) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 92, 252, .18) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  border-radius: 50%;
  animation: float2 10s ease-in-out infinite;
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--sp-md);
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
  letter-spacing: -.01em;
}

.hero p {
  color: rgba(255, 255, 255, .85);
  max-width: 650px;
  margin: 0 auto var(--sp-xl);
  font-size: var(--fs-lg);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: var(--sp-sm);
  position: relative;
  z-index: 1;
}

.page-header {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 30%, #24243e 60%, #1a1a3e 100%);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 124, 255, .15) 0%, transparent 70%);
  top: -100px;
  right: -50px;
  border-radius: 50%;
  animation: pulse 6s ease-in-out infinite;
}

.page-header::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 92, 252, .1) 0%, transparent 70%);
  bottom: -80px;
  left: -30px;
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite 2s;
}

.page-header h1 {
  color: #fff;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
  letter-spacing: -.01em;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--sp-section) 0;
  position: relative;
}

.section-alt {
  background: var(--clr-surface);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--clr-bg);
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 1;
}

.section-title {
  text-align: center;
  margin-bottom: var(--sp-2xl);
  letter-spacing: .02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--grad-accent);
  margin: var(--sp-md) auto 0;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-xl);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 124, 255, .3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 124, 255, .4);
  color: #fff;
}

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

.btn-outline:hover {
  background: var(--clr-accent);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

/* ---------- Cards ---------- */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(74, 124, 255, .12);
  border-color: rgba(74, 124, 255, .2);
}

/* Research highlight cards on homepage */
.card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(74, 124, 255, .1) 0%, rgba(124, 92, 252, .1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
  color: var(--clr-accent);
}

.card .card-icon svg {
  width: 24px;
  height: 24px;
}

.glass-card {
  background: var(--grad-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(74, 124, 255, .12);
}

/* ---------- Grid Layouts ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: var(--sp-2xl);
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--sp-xl);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse>* {
  direction: ltr;
}

/* ---------- Member Profile ---------- */
.member-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  margin-bottom: var(--sp-2xl);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-accent);
  z-index: 1;
}


/* Member Grid Layout */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
}

.member-card {
  height: 100%;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(74, 124, 255, .15);
}

.member-card .member-content {
  display: flex;
  /* Stack vertically */
  flex-direction: column;
  gap: var(--sp-lg);
  align-items: center;
  text-align: center;
  height: 100%;
}

.member-card .member-photo-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  /* Make wrapper circular */
  width: 160px;
  /* Fixed size wrapper */
  height: 160px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--clr-surface);
  outline: 2px solid var(--clr-accent);
  /* Accent ring */
  margin: 0 auto;
}

.member-card .member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.1);
}

.member-card .member-info {
  padding: 0 var(--sp-md) var(--sp-lg) var(--sp-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  /* Push button to bottom if needed */
  width: 100%;
}

.member-card h3 {
  color: var(--clr-primary);
  margin-bottom: var(--sp-xs);
  font-size: var(--fs-xl);
}

.member-card h4 {
  color: var(--clr-text-light);
  /* Accent color on hover? no keep readable */
  font-weight: 500;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--sp-md);
  display: inline-block;
  background: rgba(74, 124, 255, .08);
  padding: 4px 12px;
  border-radius: 20px;
}

.member-card p {
  font-size: var(--fs-sm);
  color: var(--clr-text);
  line-height: 1.6;
  margin-bottom: var(--sp-md);
}

.member-card .btn {
  margin-top: auto;
  /* Push to bottom of card */
}

/* ---------- Publications / Accordion ---------- */
.accordion-item {
  margin-bottom: var(--sp-md);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-md) var(--sp-xl);
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-lg);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--ff-body);
}

.accordion-trigger:hover {
  background: var(--clr-primary-light);
}

.accordion-trigger .arrow {
  transition: transform var(--transition);
  font-size: var(--fs-sm);
}

.accordion-trigger[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}

.accordion-content.open {
  max-height: none;
}

.accordion-content-inner {
  padding: var(--sp-xl);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.pub-entry {
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--clr-border);
}

.pub-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-entry .team-member {
  background: var(--clr-accent-glow);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Research Sections ---------- */
.research-topic {
  padding: var(--sp-2xl) 0;
  border-bottom: 1px solid var(--clr-border);
}

.research-topic:last-child {
  border-bottom: none;
}

.research-topic h2 {
  text-align: center;
  letter-spacing: .01em;
}

.research-topic h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--grad-accent);
  margin: var(--sp-sm) auto 0;
  border-radius: 1px;
}

.research-topic img {
  width: 100%;
  max-width: 100%;
  /* Ensure it doesn't overflow */
  height: auto;
  /* Allow natural height */
  max-height: 500px;
  /* Constrain extreme height */
  object-fit: contain;
  /* Show the WHOLE image without cropping */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform .5s ease, box-shadow .5s ease;
  background: #fff;
  /* White background for transparent/dark images */
  display: block;
  /* Remove inline gaps */
  margin: 0 auto;
  /* Center if smaller */
}

.research-topic img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.research-topic p {
  text-align: left;
}

/* ---------- Collaborations ---------- */
.collab-table {
  width: 100%;
  border-collapse: collapse;
}

.collab-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
  vertical-align: middle;
}

.collab-table td:first-child {
  width: 32px;
  padding-right: 0;
}

.collab-table td:nth-child(2) {
  white-space: nowrap;
  padding-right: var(--sp-sm);
}

.collab-table tr:hover {
  background: var(--clr-surface-alt);
}

.collab-table .flag-icon {
  width: 24px;
  min-width: 24px;
  height: auto;
  display: inline-block;
}

/* ---------- News Timeline ---------- */
.news-timeline {
  position: relative;
  padding-left: 28px;
}

.news-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--clr-accent), rgba(124, 92, 252, .3));
  border-radius: 1px;
}

.news-item {
  padding: var(--sp-xl);
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  margin-bottom: var(--sp-xl);
  border-left: 4px solid var(--clr-accent);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-timeline .news-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-accent);
  border: 2px solid var(--clr-bg);
  box-shadow: 0 0 0 3px rgba(74, 124, 255, .2);
}

.news-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.news-item .news-date {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--sp-sm);
  background: rgba(74, 124, 255, .08);
  padding: 3px 12px;
  border-radius: 20px;
}

.news-item h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-sm);
}

/* ---------- Downloads ---------- */
.download-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.download-table th {
  background: var(--clr-primary);
  color: #fff;
  padding: var(--sp-md);
  text-align: left;
  font-weight: 600;
}

.download-table td {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
}

.download-table tr:nth-child(even) {
  background: var(--clr-surface-alt);
}

.download-table tr:hover {
  background: rgba(74, 124, 255, .06);
}

/* ---------- Project Cards ---------- */
.project-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(74, 124, 255, .15);
  border-color: rgba(74, 124, 255, .2);
}

.project-card .project-card-header {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  background-size: 200% 200%;
  color: #fff;
  padding: var(--sp-xl) var(--sp-xl) var(--sp-2xl);
  text-align: center;
  position: relative;
  transition: background-position .6s ease;
}

.project-card:hover .project-card-header {
  background-position: 100% 50%;
}

.project-card .project-card-header h3 {
  color: #fff;
  margin-bottom: 0;
  font-size: var(--fs-xl);
  letter-spacing: .04em;
}

.project-card .project-card-body {
  padding: var(--sp-xl);
}

.project-card .project-card-body p {
  font-size: var(--fs-sm);
  color: var(--clr-text-light);
}

/* Project detail meta */
.project-meta p {
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--clr-text-light);
  line-height: 1.6;
}

.project-meta p strong {
  color: var(--clr-text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #1a1d23 0%, #12141a 100%);
  color: rgba(255, 255, 255, .6);
  padding: var(--sp-2xl) 0 var(--sp-xl);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-accent);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.footer-nav h4,
.footer-about h4 {
  color: rgba(255, 255, 255, .9);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--sp-md);
}

.footer-nav-links {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xs) var(--sp-xl);
}

.footer-nav-links a {
  color: rgba(255, 255, 255, .5);
  font-size: var(--fs-sm);
  transition: color var(--transition);
}

.footer-nav-links a:hover {
  color: rgba(255, 255, 255, .9);
}

.footer-about p {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(255, 255, 255, .5);
  margin-bottom: var(--sp-md);
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2xl);
  padding: var(--sp-lg);
  background: rgba(255, 255, 255, .95);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logos img {
  height: 60px;
}

.footer-bottom {
  text-align: center;
  font-size: var(--fs-xs);
  opacity: .5;
  padding-top: var(--sp-md);
}

/* ---------- Utility ---------- */
.text-center {
  text-align: center;
}

.text-justify {
  text-align: justify;
}

.mt-sm {
  margin-top: var(--sp-sm);
}

.mt-md {
  margin-top: var(--sp-md);
}

.mt-lg {
  margin-top: var(--sp-lg);
}

.mt-xl {
  margin-top: var(--sp-xl);
}

.mb-md {
  margin-bottom: var(--sp-md);
}

.mb-lg {
  margin-bottom: var(--sp-lg);
}

.mb-xl {
  margin-bottom: var(--sp-xl);
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
}

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

/* Staggered delay for grid children */
.grid-3 .fade-in:nth-child(1) {
  transition-delay: 0s;
}

.grid-3 .fade-in:nth-child(2) {
  transition-delay: .12s;
}

.grid-3 .fade-in:nth-child(3) {
  transition-delay: .24s;
}

.grid-3 .fade-in:nth-child(4) {
  transition-delay: .36s;
}

.grid-3 .fade-in:nth-child(5) {
  transition-delay: .48s;
}

.grid-3 .fade-in:nth-child(6) {
  transition-delay: .6s;
}

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

  .split.reverse {
    direction: ltr;
  }

  .member-card .member-content {
    grid-template-columns: 1fr;
  }

  .member-card .member-photo {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--sp-xl);
    gap: 0;
    transform: translateX(100%);
    transition: transform .35s ease;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links>li>a {
    display: block;
    padding: var(--sp-md);
    font-size: var(--fs-lg);
    border-bottom: 1px solid var(--clr-border);
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: var(--sp-xl);
    display: none;
  }

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

  .hero {
    padding: var(--sp-2xl) 0;
  }

  .hero h1 {
    font-size: var(--fs-3xl);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  .news-timeline {
    padding-left: 20px;
  }

  .news-timeline .news-item::before {
    left: -24px;
  }
}