/* GAERS Research Website - Main Stylesheet */

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Colors */
  --primary-blue: #0066cc;
  --primary-dark: #003d7a;
  --primary-light: #4d94ff;

  /* Accent Colors */
  --accent-red: #dc3545;
  --accent-blue: #0d6efd;
  --accent-green: #198754;
  --accent-gray: #6c757d;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #212529;

  /* Text Colors */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;

  /* Border Colors - Lighter & More Refined */
  --border-subtle: #f0f2f5;
  --border-light: #e1e4e8;
  --border-default: #d1d5db;

  /* Alpha Variants for Overlays */
  --primary-alpha-10: rgba(0, 102, 204, 0.1);
  --primary-alpha-15: rgba(0, 102, 204, 0.15);
  --primary-alpha-20: rgba(0, 102, 204, 0.2);

  /* Extended Neutral Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-800: #1f2937;

  /* Semantic Colors */
  --hover-bg: var(--gray-50);
  --focus-ring: var(--primary-alpha-15);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius - Modern & Softer */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows - More Visible & Layered */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

/* Progressive heading weights for visual hierarchy */
h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-weight: 600;
  letter-spacing: -0.015em;
}

h3 {
  font-weight: 600;
}

h4, h5, h6 {
  font-weight: 500;
}

strong, b {
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

code, .monospace {
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  background-color: var(--bg-light);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-lg);
}

main {
  flex: 1;
  padding: var(--spacing-xxl) 0;
}

section {
  margin-bottom: var(--spacing-xxl);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  min-height: 4rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  min-height: 4rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  line-height: 1;
  display: flex;
  align-items: center;
}

.nav-brand:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
  height: 100%;
}

.nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.nav-menu a:hover {
  background-color: var(--bg-light);
  color: var(--primary-blue);
  text-decoration: none;
}

.nav-menu a.active {
  background-color: var(--primary-blue);
  color: var(--bg-white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--bg-dark);
  color: var(--bg-white);
  padding: var(--spacing-xxl) 0 var(--spacing-lg);
  margin-top: auto;
}

footer a {
  color: var(--primary-light);
}

footer a:hover {
  color: var(--bg-white);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--bg-white);
  margin-bottom: var(--spacing-md);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--text-muted);
}

/* Footer Compact Details */
.footer-compact-details {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--spacing-md);
  text-align: left;
}

.footer-compact-details p {
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.9);
}

.footer-compact-details strong {
  color: var(--primary-light);
  font-weight: 600;
}

.footer-copyright {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .footer-compact-details p {
    font-size: 0.8rem;
    line-height: 1.7;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0055b8 50%, var(--primary-dark) 100%);
  color: var(--bg-white);
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

.hero-funding {
  font-size: 1rem;
  opacity: 0.85;
  font-weight: 500;
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid #e9ecef;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
    z-index: 999;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding: var(--spacing-xl) 0;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: var(--spacing-lg) 0;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }
