/* ============================================
   Design System & Custom Properties
   ============================================ */

:root {
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a8e;
  --color-accent: #c9a84c;
  --color-accent-light: #ddc06a;
  --color-text: #2c2c2c;
  --color-text-secondary: #5a5a5a;
  --color-text-muted: #888;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-bg-dark: #0f1923;
  --color-border: #e2e5ea;
  --color-border-light: #eef0f3;
  --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1140px;
}

/* ============================================
   Global Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2.75rem; letter-spacing: -0.03em; }
h2 { font-size: 2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ============================================
   Navigation
   ============================================ */

nav {
  background-color: var(--color-bg-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  height: 70px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0;
}

nav li {
  position: relative;
}

nav a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 1.4rem 1.1rem;
  display: block;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

nav a:hover {
  color: #fff;
}

nav a.active {
  color: var(--color-accent);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.1rem;
  right: 1.1rem;
  height: 2px;
  background-color: var(--color-accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  padding: 5rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.3fr auto 0.7fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-divider {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content h1 {
  color: #fff;
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
}

.hero-content > p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.75);
  max-width: 580px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-ai-emblem {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.hero-image img {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.12);
}

/* Page hero (sub-pages) */
.hero-page {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-primary) 100%);
  padding: 3.5rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
}

.hero-page h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.hero-page p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid var(--color-accent);
  letter-spacing: 0.01em;
}

.btn:hover {
  background-color: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: var(--color-bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ============================================
   Sections
   ============================================ */

section {
  padding: 5rem 2rem;
}

section.alt-bg {
  background-color: var(--color-bg-alt);
}

section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
}

section h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Section divider */
.section-divider {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary-light));
  margin: 1rem 0 2.5rem;
  border-radius: 2px;
}

/* ============================================
   Content Sections
   ============================================ */

.section-content {
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.85;
}

.section-content p {
  margin-bottom: 1.2rem;
  color: var(--color-text-secondary);
}

/* ============================================
   Grid Layouts
   ============================================ */

.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.three-cols h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.three-cols p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 2rem 0;
}

.two-cols > div {
  padding-bottom: 1rem;
}

.two-cols h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.two-cols p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* ============================================
   Cards
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  padding: 1.75rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  position: relative;
  transition: all var(--transition);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

.card h4 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem 0;
  color: var(--color-text);
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

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

/* ============================================
   Stats
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat h3 {
  font-size: 2.25rem;
  margin: 0 0 0.4rem 0;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================
   Publications
   ============================================ */

.publication-category {
  margin-bottom: 2.5rem;
}

.publication-category h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 1rem 0;
  color: var(--color-primary);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border-light);
}

.publication-item {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

.publication-item:hover {
  background-color: var(--color-bg-alt);
}

.publication-item a {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: var(--color-primary-light);
  line-height: 1.5;
}

.publication-item a:hover {
  color: var(--color-accent);
}

.publication-item .meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-style: italic;
}

/* ============================================
   Research Frameworks
   ============================================ */

.research-framework {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-border-light);
}

.research-framework:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.research-framework.reverse {
  direction: rtl;
}

.research-framework.reverse > * {
  direction: ltr;
}

.research-framework img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.research-text h3 {
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
  color: var(--color-text);
}

.research-text p {
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: 1rem;
}

/* ============================================
   Info Box
   ============================================ */

.info-box {
  padding: 1.75rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.info-box h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.info-box p {
  margin-bottom: 0;
}

.info-box.accent {
  border-left-color: var(--color-accent);
}

.info-box.muted {
  border-left-color: var(--color-text-muted);
}

/* ============================================
   Student Project Cards
   ============================================ */

.student-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  cursor: pointer;
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.student-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.student-card-body {
  padding: 1.25rem;
}

.student-card-body h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.student-card-body p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ============================================
   Modals
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 25, 35, 0.6);
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
}

.modal-dialog {
  background-color: var(--color-bg);
  margin: auto;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  float: right;
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-dialog h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-dialog p {
  line-height: 1.8;
}

/* ============================================
   Lab Criteria Items
   ============================================ */

.criteria-item {
  padding-left: 1.25rem;
  border-left: 3px solid var(--color-primary);
  margin-bottom: 1.25rem;
}

.criteria-item .criteria-title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.criteria-item .criteria-desc {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.criteria-item.accent {
  border-left-color: var(--color-accent);
}

/* ============================================
   Grant Items
   ============================================ */

.grant-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.grant-logos img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.grant-item {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.grant-item.submitted {
  border-left-color: var(--color-accent);
}

.grant-item.prep {
  border-left-color: var(--color-text-muted);
}

.grant-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.grant-item .grant-meta {
  margin: 0.4rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.grant-item .grant-desc {
  margin: 0.5rem 0 0;
  font-size: 0.93rem;
}

/* ============================================
   Recognition List
   ============================================ */

.recognition-list {
  list-style: none;
  padding: 0;
}

.recognition-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.recognition-list li:last-child {
  border-bottom: none;
}

.recognition-list a {
  font-weight: 600;
  color: var(--color-primary-light);
  font-size: 1.02rem;
}

.recognition-list a:hover {
  color: var(--color-accent);
}

.recognition-list .recognition-desc {
  margin: 0.4rem 0 0;
  color: var(--color-text-secondary);
  font-size: 0.93rem;
}

/* ============================================
   Footer
   ============================================ */

footer {
  background-color: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

footer a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--color-accent);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-clockwise {
  animation: spin-clockwise 12s linear infinite;
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in.visible {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: right var(--transition);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
  }

  nav ul.open {
    right: 0;
  }

  nav a {
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  nav a.active::after {
    display: none;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content > p {
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .hero-page h1 {
    font-size: 1.8rem;
  }

  .three-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

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

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

  .research-framework {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .research-framework.reverse {
    direction: ltr;
  }

  .research-text h3 {
    font-size: 1.2rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

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

  .hero {
    padding: 3rem 1.25rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .cards-grid {
    gap: 1rem;
  }
}

/* ============================================
   Print
   ============================================ */

@media print {
  nav { display: none; }
  footer { display: none; }
  .hero { background: none; color: #000; padding: 2rem 0; }
  .hero h1 { color: #000; }
  section { page-break-inside: avoid; }
  .btn { display: none; }
}
