@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
  /* Typography */
  --font-headings: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors derived from SPriT Lab Logo Identity */
  --color-dark-bg: #f8fafc;        /* Soft slate-white background */
  --color-navy-dark: #ffffff;      /* Pure white for card backings */
  --color-navy-light: #f1f5f9;     /* Light slate gray for sub-fields */
  --color-blue-accent: #2563eb;    /* Trust Blue (Primary Accent) */
  --color-blue-glow: #1d4ed8;      /* Royal Blue (High contrast text highlight) */
  --color-orange-accent: #ea580c;  /* Innovation Orange (Secondary Accent) */
  --color-orange-glow: #c2410c;    /* Dark Orange/Rust (High contrast text highlight) */
  --color-text-white: #0f172a;     /* Dark slate for main text and headings */
  --color-text-muted: #475569;     /* Muted slate gray for descriptions and body */
  --color-border: #cbd5e1;         /* Crisp slate border */
  --color-card-bg: rgba(255, 255, 255, 0.75); /* Light glassmorphic card background */
  --color-shadow: rgba(15, 23, 42, 0.05); /* Soft premium shadow */

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Layout */
  --max-width: 1280px;
  --header-height: 80px;
}

/* ==========================================================================
   Base resets & Boilerplate
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-dark-bg);
  color: var(--color-text-white);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--color-text-white);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-dark-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-blue-accent);
}

/* ==========================================================================
   Accessibility Utilities (WCAG Compliant)
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-blue-accent);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  z-index: 1000;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-orange-accent);
}

/* Generic Focus Outline */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-blue-glow);
  outline-offset: 4px;
}

/* ==========================================================================
   Unified Canvas Background Layer
   ========================================================================== */
#network-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Header & Navbar Layout
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: rgba(14, 29, 61, 0.92); /* Dark Navy #0E1D3D */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  height: 70px;
  background: rgba(14, 29, 61, 0.96); /* Dark Navy #0E1D3D */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.navbar {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.nav-brand .iitj-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.nav-brand .sprit-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.brand-divider {
  width: 1px;
  height: 40px;
  background-color: var(--color-border);
  margin: 0 4px;
  transition: var(--transition-smooth);
}

.site-header.scrolled .nav-brand .iitj-logo {
  height: 50px;
}

.site-header.scrolled .nav-brand .sprit-logo {
  height: 50px;
}

.site-header.scrolled .brand-divider {
  height: 28px;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-title {
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.nav-brand-subtitle {
  font-size: 0.7rem;
  color: #cbd5e1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-item {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 0;
}

.nav-item:hover, .nav-item.active {
  color: #ffffff;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-blue-accent);
  transition: var(--transition-smooth);
}

.nav-item:hover::after, .nav-item.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Page Layout & Common Components
   ========================================================================== */
.main-content {
  flex: 1;
  padding-top: var(--header-height);
  position: relative;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  position: relative;
  z-index: 2;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text-white);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-blue-accent);
  margin: 20px auto 0 auto;
  border-radius: 2px;
}

/* Glassmorphic Cards styling */
.glass-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px var(--color-shadow);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--color-blue-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  background: #1d4ed8;
}

.btn-secondary {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  color: var(--color-text-white);
}

.btn-secondary:hover {
  background: var(--color-navy-light);
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-orange-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
  background: #c2410c;
}

/* Icons & Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-blue {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-blue-glow);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.badge-orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--color-orange-glow);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Footer Layout
   ========================================================================== */
.site-footer {
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 0 30px 0;
  color: #94a3b8;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 60px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  height: 48px;
  width: auto;
}

.footer-logo-title {
  font-family: var(--font-headings);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.footer-address {
  font-style: normal;
  line-height: 1.7;
  color: #cbd5e1;
}

.footer-links-col h3, .footer-contact-col h3 {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-links-col h3::after, .footer-contact-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-blue-accent);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  color: #94a3b8;
}

.footer-links-list a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-contact-icon {
  color: var(--color-blue-accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.footer-contact-item a {
  color: #94a3b8;
}

.footer-contact-item a:hover {
  color: #ffffff;
}

.footer-social-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.footer-social-icon:hover {
  background: var(--color-blue-accent);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0 auto;
  padding: 30px 24px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-info {
    grid-column: span 2;
  }

  /* Responsive header logo size for tablets */
  .nav-brand .iitj-logo {
    height: 55px;
  }
  .nav-brand .sprit-logo {
    height: 55px;
  }
  .nav-brand .brand-divider {
    height: 32px;
  }
  .site-header.scrolled .nav-brand .iitj-logo {
    height: 45px;
  }
  .site-header.scrolled .nav-brand .sprit-logo {
    height: 45px;
  }
  .site-header.scrolled .brand-divider {
    height: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: #0E1D3D;
    flex-direction: column;
    padding: 40px 0;
    gap: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: var(--transition-smooth);
    z-index: 99;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  /* Responsive header logo size for mobile */
  .nav-brand .iitj-logo {
    height: 46px;
  }
  .nav-brand .sprit-logo {
    height: 46px;
  }
  .nav-brand .brand-divider {
    height: 24px;
  }
  
  .site-header.scrolled .nav-brand .iitj-logo {
    height: 40px;
  }
  .site-header.scrolled .nav-brand .sprit-logo {
    height: 40px;
  }
  .site-header.scrolled .brand-divider {
    height: 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .page-header h1 {
    font-size: 2.2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-info {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ==========================================================================
   Common Form Components (Search Inputs)
   ========================================================================== */
.search-wrapper {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  font-size: 0.9rem;
  border-radius: 8px;
  background: var(--color-navy-dark);
  border: 1px solid var(--color-border);
  color: var(--color-text-white);
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--color-blue-accent);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
  outline: none;
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.site-header .sprit-logo {
  filter: brightness(0) invert(1);
}
.brand-divider {
  background-color: rgba(255, 255, 255, 0.2);
}
