:root {
  --color-bg: #050816;
  --color-bg-elevated: #0d1224; /*nav ribbon bar color*/
  --color-surface: #101827;
  --color-surface-soft: #151b2e;
  --color-border: #252f46;
  --color-primary: #22c3ff;
  --color-primary-soft: rgba(34, 195, 255, 0.16);
  --color-accent: #ffb347;
  --color-text: #e5e7eb;
  --color-text-muted: #fdfeff;
  --color-pill-bg: #1f2937;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-subtle: 0 4px 10px rgba(0, 0, 0, 0.3);

  --max-width: 100%;
  --header-height: 64px;
  --transition-fast: 0.15s ease-out;
  --transition-med: 0.25s ease-out;

  --color-text-footer: #F5FAFC
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* Utility */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.section-header {
  max-width: 100%;
  margin: 0 auto 2.5rem auto;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.1rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}



/* Site header / navigation */

.site-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #22c3ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
}
.logo-image {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}


.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 650;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

.logo-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}


/* Nav */

.main-nav {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-item > a,
.nav-link-button {
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;

  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item > a:hover,
.nav-link-button:hover {
  color: var(--color-primary);
  background: rgba(148, 163, 184, 0.1);
}

.nav-item.nav-has-dropdown {
  position: relative;
}


/* ------------------------------
  Dropdown
-------------------------------- */

.nav-dropdown {
  position: absolute;
  left: 0;

  /* FIX: remove vertical gap and add hover buffer */
  top: 100%;
  margin-top: -6px;      /* pulls dropdown upward */
  padding-top: 6px;      /* invisible buffer area */

  min-width: 220px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  list-style: none;
  margin: 0;

  /* Smooth fade-in/out */
  opacity: 0;
  display: block;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}

/* Show dropdown on hover (desktop) */
@media (min-width: 900px) {
  .nav-item.nav-has-dropdown:hover > .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Dropdown link styling */
.nav-dropdown li a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown li a:hover {
  background: rgba(15, 118, 110, 0.25);
  color: var(--color-primary);
}


/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 999px;
  margin: 3px 0;
}


/* Hero section */

.hero {
  background:
    radial-gradient(circle at top left, rgba(34, 195, 255, 0.25), transparent 60%),
    radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.18), transparent 55%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.7fr);
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.1rem, 3vw + 1.3rem, 2.8rem);
  margin: 0 0 0.9rem 0;
}

.hero-text p {
  margin: 0 0 1.4rem 0;
  color: var(--color-text-muted);
  max-width: 34rem;
  font-size: 0.98rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #22c3ff, #0ea5e9);
  color: #020617;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(15, 23, 42, 0.8);
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* 
.hero-card {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}

.hero-card li + li {
  margin-top: 0.35rem;
}

.hero-card strong {
  color: var(--color-accent);
}

.hero-tagline {
  display: flex;
  justify-content: flex-end;
} */

/* .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.8rem;
  color: var(--color-text-muted);
} */

/* Highlights */

.highlights {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  transition: background 0.4s ease-out;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.card p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.card-link {
  font-size: 0.88rem;
  color: var(--color-primary);
  text-decoration: none;
}

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

/* Affiliates */

/* Affiliates / Strategic Partners Section */
.affiliates {
  padding: 2.5rem 1.25rem 2.75rem;

  /* Background will be set dynamically via JSON,
     so keep a fallback here */
  background: var(--color-surface-soft);

  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);

  transition: background 0.4s ease-out;
}

.affiliates .section-header {
  text-align: center ;
  margin-bottom: 2rem;
}

/* Auto-fit number of groups (Grid-Scale, Tech, Innovation, etc.) */
.affiliates-groups {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Group title */
.affiliate-group h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 1.02rem;
  color: var(--color-text);
}

/* Partners inside a group */
.logo-grid {
  display: grid;

  /* Auto-fit partner items inside each group */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
}
/* CLEAN ACADEMIC PARTNER LOGO STYLE */
.logo-placeholder {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: auto !important;
}

/* Logos should appear clean, unboxed */
.logo-placeholder img {
  max-height: 55px;
  width: auto;
  object-fit: contain;
  display: block;
}


/* Optional: clickable partners look nicer */
.logo-grid a {
  text-decoration: none;
}

/* Departments */

.departments {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.8rem 1.25rem 2.8rem;

  /* JSON dynamic background support */
  background: transparent;
  transition: background 0.35s ease-out;
}

/* Department pills container */
.departments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: flex-start;

  /* Helps spacing on smaller screens */
  margin-top: 1.5rem;
}

/* Individual department pill */
.dept-pill {
  display: inline-block;
  padding: 0.45rem 1rem;

  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 500;

  background: var(--color-pill-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);

  text-decoration: none;
  white-space: nowrap; /* Prevents ugly wrapping */
  transition: 
    color 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

/* Hover effect */
.dept-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(34, 195, 255, 0.08);
}

/* Better spacing on mobile */
@media (max-width: 600px) {
  .dept-pill {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}


/* News & Events */
/* News & Events */

.news-events {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.8rem 1.25rem 3.2rem;

  /* Allow JSON-driven background changes smoothly */
  background: transparent;
  transition: background 0.35s ease-out;
}

/* --- IMAGE GALLERY (NEW) --- */

.news-gallery {
  width: 100%;
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.4rem;
  position: relative;
}

.gallery-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #fff;
  pointer-events: none;
}

/* --- GRID LAYOUT --- */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 2rem;
}

.two-column h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

/* NEWS CARDS */

.news-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
  margin-bottom: 1rem;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.news-card h4 {
  margin: 0 0 0.45rem 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.news-card p {
  margin: 0 0 0.7rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* EVENTS LIST */

.events-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.events-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-border);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.events-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.event-date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  border: 1px solid rgba(34, 195, 255, 0.4);
}

.event-month {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
}

.event-day {
  font-size: 1rem;
  font-weight: 700;
}

.event-info h4 {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.event-info p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

/* --- RESPONSIVE --- */

@media (max-width: 900px) {
  .news-gallery {
    height: 200px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .news-gallery {
    height: 160px;
  }
}


/* Footer */

/* Footer */

.site-footer {
  /* Background will be replaced dynamically by JSON */
  background: #ffffff;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 2rem;

  /* Smooth background transition */
  transition: background 0.35s ease-out, background-image 0.35s ease-out;
}

.footer-top {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 1.8rem;

  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr);
  gap: 2rem;
}

/* Left side logo & address */
.footer-brand .site-logo {
  margin-bottom: 1rem;
}

.footer-address p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-footer);
}

.footer-address p + p {
  margin-top: 0.15rem;
}

/* Social icons */
.footer-social {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-social a {
  font-size: 0.8rem;
  color: var(--color-text-footer);
  transition: color 0.25s ease-out;
}

.footer-social a:hover {
  color: var(--color-text-footer);
}

/* Right side columns */
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
}

.footer-column h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
  color: var(--color-text-footer);
  font-weight: 600;
}

.footer-column a {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-footer);
  margin-bottom: 0.3rem;
  transition: color 0.25s ease-out;
}

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

/* Footer bottom line */
.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.8rem 1.25rem 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.footer-bottom a {
  margin-left: 0.6rem;
  color: #9ca3af;
  transition: color 0.25s ease-out;
}

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

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

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}


/* Responsive */

@media (max-width: 900px) {
  .global-bar-inner {
    flex-wrap: wrap;
  }

  .global-links {
    display: none;
  }

  .site-header-inner {
    padding: 0.6rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    margin-top: 0.4rem;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item > a,
  .nav-link-button {
    justify-content: space-between;
    width: 100%;
  }

  .nav-dropdown {
    position: static;
    margin-top: 0.25rem;
    box-shadow: none;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    display: none;
  }

  .nav-dropdown.is-open {
    display: block;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2.5rem;
  }

  .hero-media {
    order: -1;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliates-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }
}
.footer-logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
  display: block;
}
