:root {
  --color-primary: #281e78;
  --color-secondary: #fa4616;
  --color-accent: #fa4616;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #1a1a2e;
  --color-text-muted: #555;
  --color-border: #e0e0e0;
  --font-family: 'Raleway', system-ui, sans-serif;
  --space-unit: 1rem;
  --container-max: 1000px;
  --border-radius: 4px;
  --header-height: 70px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a2e;
    --color-bg-alt: #22223b;
    --color-text: #f0f0f0;
    --color-text-muted: #aaa;
    --color-border: #333;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-unit);
}

.section {
  padding: 4rem 0;
}

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

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.axis-title {
  text-align: center;
  margin: 2rem 0 1rem;
  color: var(--color-secondary);
  font-size: 1.5rem;
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: #1d165c;
  border-color: #1d165c;
  color: #fff;
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background: #d93d13;
  border-color: #d93d13;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.pdf-link {
  color: var(--color-accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-link img {
  width: 18px;
  height: 18px;
  display: inline;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

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

.logo img {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--color-text);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--color-secondary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0 0.75rem;
  margin-top: 2rem;
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-partners img {
  height: 28px;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer-partners img:hover {
  opacity: 1;
}

.footer-divider {
  border-top: 1px solid var(--color-border);
  margin: 1rem 0;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer-contact h3 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--color-secondary);
}

.footer-contact div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.footer-contact p {
  margin: 0;
}

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding-top: 1rem;
}

.hero {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-image {
  margin-top: 2rem;
}

.hero-image img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

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

.domains-apps-grid .col h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--color-secondary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.team-card {
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-border);
}

.team-name {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.team-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.team-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.team-links a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.team-links img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(30%) sepia(10%) saturate(1500%) hue-rotate(230deg) brightness(90%) contrast(90%);
}

.team-links a:hover img {
  filter: brightness(0) invert(1);
}

.team-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.team-filter {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.team-filter.active,
.team-filter:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.publication-item {
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid transparent;
  transition: all var(--transition);
}

.publication-item.highlight {
  border-left-color: var(--color-primary);
  background: rgba(40, 30, 120, 0.05);
}

.publication-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--color-primary);
}

.publication-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.software-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.software-card {
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.software-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.software-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.software-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.software-header .software-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.software-header .software-title {
  margin-bottom: 0;
}

.software-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.software-desc {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.software-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.job-card {
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border-left: 4px solid var(--color-secondary);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.job-title {
  font-size: 1.25rem;
  color: var(--color-primary);
}

.job-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.job-meta strong {
  color: var(--color-text);
}

.job-desc {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.job-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.internship-note {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--color-secondary);
}

.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.accordion summary {
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-alt);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-secondary);
  transition: transform var(--transition);
}

.accordion[open] summary::after {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.research-section {
  margin-bottom: 3rem;
}

.research-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-secondary);
}

.research-axis {
  margin-bottom: 2.5rem;
}

.research-axis h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.research-axis .pis {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.research-collabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.collab-group h3 {
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.collab-list {
  list-style: none;
}

.collab-list li {
  margin-bottom: 0.75rem;
}

.funding-list {
  list-style: none;
}

.funding-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.funding-list li::before {
  content: '\2022';
  color: var(--color-secondary);
  position: absolute;
  left: 0;
}

.research-content-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
}

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

.page-header {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
}

/* Table of Contents */
.table-of-contents {
  position: fixed;
  right: 1.5rem;
  top: calc(var(--header-height) + 1.5rem);
  max-width: 250px;
  z-index: 100;
  font-size: 0.875rem;
}

.toc-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-family);
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

.toc-toggle:hover {
  background: var(--color-bg-alt);
}

.toc-icon {
  font-size: 1rem;
}

.toc-list {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
}

.toc-list li {
  margin-bottom: 0.375rem;
}

.toc-list a {
  display: block;
  padding: 0.25rem 0.5rem;
  color: var(--color-text);
  border-radius: var(--border-radius);
  transition: background var(--transition);
}

.toc-list a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.toc-h2 {
  font-weight: 600;
}

.toc-h3 {
  padding-left: 1.5rem;
  font-weight: 400;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .table-of-contents {
    display: none;
  }
}

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

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    display: none;
  }

  .nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
  }

  .nav-link:hover {
    background: var(--color-bg-alt);
  }

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

  .domains-apps-grid {
    grid-template-columns: 1fr;
  }

  .footer-contact {
    flex-direction: column;
    gap: 1.5rem;
  }

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

  .software-list {
    gap: 1.5rem;
  }

  .job-header {
    flex-direction: column;
  }
}

.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;
}